Open imperio-wxm opened 1 year ago
Hey @imperio-wxm, GT does not support ESRI projections, so it is not a bug; we default back to LatLng in this case, similar to GDAL.
cs.Tags.model
contains 6.3.1.1 Model Type Codes.
6.3.1.1 Model Type Codes
Ranges:
0 = undefined
[ 1, 32766] = GeoTIFF Reserved Codes
32767 = user-defined
[32768, 65535] = Private User Implementations
GeoTIFF defined CS Model Type Codes:
ModelTypeProjected = 1 /* Projection Coordinate System */
ModelTypeGeographic = 2 /* Geographic latitude-longitude System */
ModelTypeGeocentric = 3 /* Geocentric (X,Y,Z) Coordinate System */
As you can can see, this code https://github.com/locationtech/geotrellis/blob/master/raster/src/main/scala/geotrellis/raster/io/geotiff/tags/TiffTags.scala#L339-L364 handles support of ModelTypeProjected
and ModelTypeGeographic
models only. 32767
matches to the user-defined
model which is not handled at the moment (handled as None
).
@pomadchin Hi, why doesn't it throw an unsupported exception? The default LatLng will cause crs and extent to not be in the same system, no errors will be reported during the calculation process, and it is difficult to find problems.
Well no error is because very often it happens so that the dataset contains invalid or a partially valid GIS data (it is pretty much imperfect and contains a lot of legacy usually).
Another argument is to align with the GDAL behavior.
I would agree though, at least some extra logging could help.
Describe the bug
Crs info error when reading a tiff file with coordinates ESRI:54009
To Reproduce
cog.tiff.zip
When I debugged the TiffTags class, I found that there was a problem with the acquisition of crs, and the default LatLng coordinate system was used.
Environment
Java version: 1.8.0_151
Scala version: 3.2.1
GeoTrellis: 3.6.2