WorldBank-Transport / open-transit-indicators

An open-source tool to support transport agencies in planning and managing public transit systems
GNU General Public License v3.0
44 stars 21 forks source link

Transform GeoTiff to Lat/Lon before returning #658

Closed ddohler closed 9 years ago

ddohler commented 9 years ago

The rasters in the RasterCache are stored in WebMercator, but the GeoTiff writer only supports EPSG 4326, and does not automatically transform rasters in other projections. This was causing errors when trying to use the downloaded GeoTiff under certain circumstances because its actual coordinates didn't match its stated projection. This reprojects the raster to EPSG 4326 before serving it.

Note that this doesn't transform to the selected UTM zone; that information isn't readily available in the context of the GeoTiff endpoint, so it would have been more complex to do that. However, now that the GeoTiffs' projection matches their data, it should be straightforward to process them using standard tools and reproject them to a UTM projection if necessary.

kshepard commented 9 years ago

+1