I create a shapefile using this ogr2ogr command:
ogr2ogr -f "ESRI Shapefile" -overwrite -a_srs EPSG:28992 -explodecollections \
-makevalid "Clipped.shp" "org.shp" -clipsrc "border.shp"
Because of -a_srs
a .prj file is also created. When I look at https://epsg.io/28992 I can see the content of this .prj file is in ESRI WKT
.
When I open this file in Surfer I get a warning the projection cannot be read.
When I replace the content of the .prj-file with the OGC WKT
version, Surfer has no problems opening this file.
I assume ogr2ogr uses the ESRI WKT
format because I set the format to ESRI Shapefile
.
I tried adding --config OSR_WKT_FORMAT
for all options (SFSQL WKT1_SIMPLE WKT1 WKT1_GDAL WKT1_ESRI WKT2_2015 WKT2_2018 WKT2 DEFAULT) but the .prj-file is always the same.
How do I instruct ogr2ogr to create the .prj file in OGC WKT
format?
--config OSR_WKT_FORMAT
suggests you can change it. But how?