I cannot figure it out if it's possible to get pixel information from my rasters using
gdallocationinfo is usable.
I basically need this:
gdallocationinfo mytiff.vrt lonlat.lon lonlat.lat -valonly -geoloc
var gdal = require("gdal"); var dataset = gdal.open("mytiff.vrt"); console.log("number of bands: " + dataset.bands.count()); console.log("width: " + dataset.rasterSize.x); console.log("height: " + dataset.rasterSize.y); console.log("geotransform: " + dataset.geoTransform); console.log("srs: " + (ds.srs ? ds.srs.toWKT() : 'null'));
but I get:
Uncaught ReferenceError: require is not defined
It seems to me that node-gdal is not being recognized, do I need to add some kind of src path to my HTML file first to get node-gdal working?