Open VanessaSutton-Pande opened 6 years ago
This could be a bit of nuisance to fix since there is no geotiff viewer for linux (AFAIK), so I won't be able to easily test a fix, but I'll poke around to see what's up.
@htmlboss you can use google earth to open a geotiff file.
here is a quick guide on how to. but really you just need to import it.
you can also use google earth to see the points that were plotted and change them to see what fits.
The place to start looking at this issue is probably https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/92078e54079d2be5d85b4bc80e89550075701451/plotting/map.py#L450 that is the start of a section which defines the different aspects of the tiff file that is being generated.
So it IS a projection issue. The Navigator is sending out the image with a Lambert Conformal Conic (LCC) projection. Google Earth uses EPSG:3857 web mercator...so we need to talk about what format do we want to support.
I think the format we have is fine but if we export a different projection that's probably fine.
Did some more investigating:
map.py
needs to be refactored, and cartopy integrated (or check if xArray can do the same job).dependent on #294
The issue occurs because the current GeoTIFF code uses EPSG:3857 which uses meters as the units for Lat/Lon. Our datasets are based on the WGS84 spheroid (specifically EPSG:4326) which uses degrees for Lat/Lon. Moving forward we simply need to create our GeoTIFFs with the EPSG:4326 projection.
Whoever ends up doing this: the GeoTIFF code should be re-written to use rioxarray
instead of gdal. It results in a 3-4 line implementation instead of manually constructing the file.
GeoTiff but they don’t seem to be plotting correctly. Feedback from user: it may be because the coordinate reference system is not specified fully. Specifically, there is no datum specified, and that could be why everything is shifted over. (Usually at minimum there is a projection, ellipsoid, and datum specified in the spatial reference). Here is a screenshot. Not sure if this is an easy fix, thought I’d let you know.