jiayuasu opened a new issue, #3121:
URL: https://github.com/apache/sedona/issues/3121

   ### Description
   
   The `netcdf.metadata` data source (#2829) resolves a CRS from 
`crs_wkt`/`spatial_ref` attributes and infers EPSG:4326 for a plain 
`latitude_longitude` grid mapping. However, CF `crs_wkt` is optional: the 
canonical CF form defines the CRS through `grid_mapping_name` plus 
projection/ellipsoid parameters (`standard_parallel`, 
`longitude_of_central_meridian`, `semi_major_axis`, ...). Files written this 
way currently report null `crs`/`srid`.
   
   ### Proposed work
   
   Translate CF grid mapping parameters to a CRS for the common projections:
   
   - `latitude_longitude` (with explicit ellipsoid/datum parameters)
   - `mercator`
   - `transverse_mercator`
   - `universal_transverse_mercator`
   - `lambert_conformal_conic` (1SP and 2SP)
   - `polar_stereographic`
   - `stereographic`
   - `albers_conical_equal_area`
   - `lambert_azimuthal_equal_area`
   
   Reference: CF conventions Appendix F (grid mappings), and GDAL's netCDF 
driver which implements the full table.
   
   ### Suggested approach
   
   Implement the translator as CF parameters -> PROJ string in proj4sedona (it 
already parses/serializes PROJ strings, WKT1/WKT2, and PROJJSON), then have 
`netcdf.metadata` populate `crs` (WKT) and `srid` from the result. Locating it 
in proj4sedona keeps the data source free of LGPL GeoTools dependencies and 
makes the same translation available to `RS_FromNetCDF`, which currently does 
not georeference the rasters it loads.
   
   ### Related
   
   - #3115 / #2829 (`netcdf.metadata` data source; ships the minimal CRS 
support described above)
   - #2846 (`geotiff.metadata`)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to