Giter VIP home page Giter VIP logo

Comments (6)

brandonreavis avatar brandonreavis commented on August 10, 2024

What raster file are you using to test it?

I get the same result as you when calling getNoDataValue() on samples/example.tif, but that is because there isn't any no-data value set for that raster.

It seems to be working fine for me if I try it with a raster that has a no-data value set.

from node-gdal.

GretaCB avatar GretaCB commented on August 10, 2024

I am using node-gdal/examples/sample.tif and a LANDSAT 7 image I downloaded from Earth Explorer. I just downloaded another and I did get a number value -1000000000 for nodata.

Thanks for your response!

from node-gdal.

GretaCB avatar GretaCB commented on August 10, 2024

@brandonreavis Would it be possible to return null instead of NaN in this situation?

from node-gdal.

brandonreavis avatar brandonreavis commented on August 10, 2024

@GretaCB Great minds think alike haha. I changed that about an hour ago and am about to push the changes and post it to this thread.

I'm in the midst of cleaning up RasterBand objects now. getNoDataValue() will change to become an attribute so you can get it by just writing band.noDataValue.

Hopefully in the next day or two we will have the API more in its final state so you won't have to keep changing your scripts. Thanks for testing things out!

from node-gdal.

GretaCB avatar GretaCB commented on August 10, 2024

Awesome @brandonreavis :) thanks! And if you need help with writing tests, and getting things squared away on the javascript side, let me know! I can actually start picking away at some tests tonight/tomorrow if that will help.

I'm assuming the functions in the .cpp classes are the ones that need tests? For example: https://github.com/naturalatlas/node-gdal/blob/9d63fd6baf896fcf8067c2ec1d2b864a10156496/src/gdal_rasterband.cpp#L18-56

from node-gdal.

brandonreavis avatar brandonreavis commented on August 10, 2024

Alright will do! Thanks! @brianreavis knows more than I do about where we are with writing tests.

Probably the best thing to do at the moment is to look over the documentation and see if anything else seems awkward or missing (like the color interpretation thing). That's been a great help!

from node-gdal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.