Re: [gdal-dev] Compound CRS in shapefile

2020-10-23 Thread Even Rouault
Javier, > The prj that a friend gave me was this: > PROJCS["NAD_1983_2011_StatePlane_Colorado_Central_FIPS_0502_Ft_US",GEOGCS["G > CS_NAD_1983_2011",DATUM["D_NAD_1983_2011",SPHEROID["GRS_1980",6378137.0,298. > 257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJE > CTION["La

Re: [gdal-dev] Compound CRS in shapefile

2020-10-22 Thread Javier Jimenez Shaw
Oh, I forgot to mention the versions I am using: to compile and run the C++ code: PROJ 7.0.1, GDAL 3.1.0 (sorry, that is the environment I had configured). To run ogr2ogr unfortunately I forgot to change the path to the build version, and was using the installed one, GDAL 2.2.3. Now repeating with

Re: [gdal-dev] Compound CRS in shapefile

2020-10-21 Thread Even Rouault
> If I try to open the file point_out.shp in QGIS, it does not recognize the > CRS at all. There is no CRS set to that layer. Not even the horizontal one. > It also displays a question mark in the "Layer" pane. > > The content of the .prj file is this: > COMPD_CS["OSGB 1936 / British National Grid

Re: [gdal-dev] Compound CRS in shapefile

2020-10-21 Thread Javier Jimenez Shaw
I forgot a few lines in the C++ code, but they are not needed to reproduce the problem if( poLayer->CreateFeature( poFeature ) != OGRERR_NONE ) { exit( 1 ); } .___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... ._ .__ Entre dos pensamientos racionales hay i

Re: [gdal-dev] Compound CRS in shapefile

2020-10-21 Thread Javier Jimenez Shaw
Sorry Even for the lack of detail. Let's see if now it is more clear. I have done this small code example based on https://gdal.org/tutorials/vector_api_tut.html#writing-to-ogr but setting a SpatialReference, EPSG:7405 (no checks to make code simpler) #include "gdal/ogr_spatialref.h" #include "gd

Re: [gdal-dev] Compound CRS in shapefile

2020-10-20 Thread Even Rouault
Javier, > When I create a 3D shapefile with GDAL, and I provide as SpatialReference a > compound CRS, it generates the prj file with the COMPD_CS syntax. Ok so far. Always be specific: show the content of the .prj > However, when I open the shapefile in QGIS, it does not recognize the CRS > at a

[gdal-dev] Compound CRS in shapefile

2020-10-20 Thread Javier Jimenez Shaw
Hi When I create a 3D shapefile with GDAL, and I provide as SpatialReference a compound CRS, it generates the prj file with the COMPD_CS syntax. Ok so far. However, when I open the shapefile in QGIS, it does not recognize the CRS at all (neither the horizontal part) Is that intentional? QGIS is