[gdal-dev] question re netcdf grid_mapping

Michael Sumner mdsumner at gmail.com
Tue Mar 1 16:55:32 PST 2022


Hello, I'm looking at the constants for CF_PT_* projection families in

frmts/netcdf/netcdf_cf_constants.h

I have a grid_mapping variable with attributes:

   # float swiss_lv95_coordinates ;
       #          swiss_lv95_coordinates:_FillValue = -1.f ;
       #          swiss_lv95_coordinates:grid_mapping_name = "Oblique
Mercator (LV95 - CH1903+)" ;
       #          swiss_lv95_coordinates:longitude_of_projection_center =
7.43958333 ;
       #          swiss_lv95_coordinates:latitude_of_projection_center =
46.9524056 ;
       #          swiss_lv95_coordinates:false_easting = 2600000. ;
       #          swiss_lv95_coordinates:false_northing = 1200000. ;
       #          swiss_lv95_coordinates:inverse_flattening = 299.1528128 ;
       #          swiss_lv95_coordinates:semi_major_axis = 6377397.155 ;

and by my understanding this would require something like

#define    CF_PT_LV95     "Oblique Mercator (LV95 - CH1903+)"

and then attendant logic in the driver for that case, this is "EPSG:2056".

It seems like this is a very long project of collating specific values used
for a crs name ... where the more general case would use those parameters
to build an Oblique Mercator - but this is Swiss oblique mercator  with a
simpler set of initialization params.

Is it a case of needing a very specific else if to match this case, or is
there some more to this?

Is it worth contributing cases as PRs?

(I'm inclined to advise "use -a_srs 'EPSG:2056'". )

Cheers, Mike

Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220302/dec0fa1b/attachment.html>


More information about the gdal-dev mailing list