Deltares / GEOLib-Plus

GEOLib+ is built on top of GEOLib and provides CPT (both GEF and XML) intepretation, among other useful tooling.
https://deltares.github.io/GEOLib-Plus
8 stars 7 forks source link

Obtain coordinate reference system from parsed GEF-file #7

Open martijnkriebel opened 1 year ago

martijnkriebel commented 1 year ago

After parsing a GEF-file, the GefCpt object contains much of the metadata of the GEF-file. However, there doesn't seem to be a way to access the code of the coordinate reference system (CRS) while this is possible for the vertical datum (the "vertical_datum" attribute).

Even though one can assume that if the vertical datum code is 31000 (NAP), the CRS is probably also 31000 (RD), it would be best to explicitly check this. I would expect the CRS code to be located either in the "coordinates" attribute or as a separate attribute called "crs"/"coordinate_reference_system".

EleniSmyrniou commented 1 year ago

Could you maybe provide a gef file were this happens? So we can investigate and have a common point of reference.

martijnkriebel commented 1 year ago

An example GEF file can be downloaded here.

Additionally I found that Geolib+ determines the CRS and vertical datum using the data that is located on the line of MEASUREMENTTEXT=7 (CRS) and MEASUREMENTTEXT=8 (vertical datum). However, wouldn't it be better to use the XYID and ZID parameters for this? Not all GEF files contain MEASUREMENTTEXT 7 and 8, while they are all required to have XYID and ZID (which contain the reference system codes as well).