GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
296 stars 58 forks source link

Cannot read properties of null (reading 'GeographicTypeGeoKey') #125

Open Anata22340 opened 1 year ago

Anata22340 commented 1 year ago

how to ignore when geoKeys is null

shujaahmedi2l commented 1 year ago

@Anata22340 any luck ? because I am facing the same error

DanielJDufour commented 10 months ago

Hey, technically you can over-ride the projection using the projection property in metadata. I think it can be accomplish like the following or something close to it:

parseGeoraster(data, { projection: 4326 })

See: https://github.com/GeoTIFF/georaster/pull/66/files#diff-bfe9874d239014961b1ae4e89875a6155667db834a410aaaa2ebe3cf89820556

Thank you to nmaltsev!

However, I should give the disclaimer this functionality will probably be reworked in the next major version upgrade of georaster. It's not a part of the public official API. You'll still be able to accomplish the same purpose, but may have to set the projection in a different way. But as long as you pin your version of georaster, you should be okay :-)