locationtech / geotrellis

GeoTrellis is a geographic data processing engine for high performance applications.
http://geotrellis.io
Other
1.34k stars 360 forks source link

GeoTrellisRasterSource possible reprojection bug #3258

Open pomadchin opened 4 years ago

pomadchin commented 4 years ago

During the geotrellis-server work I notcied that WMS produces an incorrect metadata for some certain layers:

val rs = RasterSource("gt+s3://geotrellis-demo/catalog/napl?layer=markham&zoom=18&band_count=1")
val rr = rs.reproject(LatLng)
val expected = ReprojectRasterExtent(rs.gridExtent, rs.crs, LatLng, Options.DEFAULT)
rr.extent shouldBe expected.extent

//  actual: Extent(-79.40248489379884, 43.81618476019972, -79.15603855282134, 43.943257696006555) was not equal to 
// expected: Extent(-79.42689299583435, 43.78121880534035, -79.13940902524496, 43.95686961703119)

The difference is pretty signifcant for WMS visualisation. The temporary workaround for WMS services would be applied.

FireByTrial commented 4 years ago

I'm not sure if this could also be the source of our issues with the reprojection (along with #3071 ) . I really need to get a test together with some open data, but I know I've seen this change since we started the 2.x/3.x update.

FireByTrial commented 4 years ago

example project that shows the difference between 1.2.1 and 3.x: https://github.com/FireByTrial/geotrellis-issue-tests/tree/master example outputs from 1.2.1 and 3.4.1 are provided, updates to the tests for 3.5.0 are available in the GT_3.5.0 branch https://github.com/FireByTrial/geotrellis-issue-tests/tree/GT_3.5.0