harmonica icon indicating copy to clipboard operation
harmonica copied to clipboard

Add projection information to DataArrays read from GRD files

Open santisoler opened this issue 1 year ago • 13 comments

Description of the desired feature:

Right before merging #348 @mdtanker noticed that the load_oasis_grd() function doesn't preserve information about the grid projection. Even though the file header has a few bytes reserved for storing reference to map projection, this bytes seem to be always equal to zero. Nevertheless, the projection information is available in the .xml files that accompany the .grd files. @mdtanker wrote a snippet that can read those files and extract the information about the grid projection.

Would be nice to add the load_oasis_grd() function the capability to read the xml files and preserve the information about the grid projection. The two things that should be preserved are:

  • they projection code/type (EPSG code, UTM zone, etc)
  • the datum (e.g. WGS84)

Since the xml should have the same filename as the .grd file we can assume their name. But the function should be able to read the .grd file even if the xml file doesn't exist. Maybe raising a warning would be nice.

Are you willing to help implement and maintain this feature? Yes, but would love to see contributors to tackle this one, specially if they have access to Oasis Montaj license and can generate sample files to test this feature.

santisoler avatar Nov 25 '22 19:11 santisoler