[PROJ] (Angular/Linear/Scale) speed in C++ API

Even Rouault even.rouault at spatialys.com
Mon Dec 2 11:06:32 PST 2019


On lundi 2 décembre 2019 19:51:24 CET Martin Desruisseaux wrote:
> Le 02/12/2019 à 19:42, Even Rouault a écrit :
> > No, you didn't miss anything. Only the GDAL flavor/interpretation of
> > WKT1 has been implemented in createFromWKT()
> 
> Thanks, I will adjust the API accordingly in Java bindings.
> 
> Is OGC 01-009 version of WKT 1 unsupported at formatting time too?

Yes. But is there really an un-ambiguous interpretation of OGC 01-009... ? I 
doubt so: isn't that the reason for WKT2 ? Everyone has understood it as it 
could, sometimes "rightly", somes "wrongly" and stick with it.

> If yes, what is the difference between WKTFormatter::Convention::WKT1_GDAL
> and WKTFormatter::Convention::WKT1_ESRI?

A lot... CRS names, datum names, ellipsoid names, projection method names, 
parameter names. No AUTHORITY[] or AXIS[] nodes in WKT1_ESRI. 
Basically WKT1_ESRI is what you find in shapefile .prj files

PROJ also makes an effort to use the names found in the proj.db under the ESRI 
authority when it can match the CRS object with an existing entry.

Example:

$ projinfo EPSG:2225 -o WKT1_GDAL,WKT1_ESRI
WKT1:GDAL string:
PROJCS["NAD83 / California zone 1 (ftUS)",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["latitude_of_origin",39.3333333333333],
    PARAMETER["central_meridian",-122],
    PARAMETER["standard_parallel_1",41.6666666666667],
    PARAMETER["standard_parallel_2",40],
    PARAMETER["false_easting",6561666.667],
    PARAMETER["false_northing",1640416.667],
    UNIT["US survey foot",0.304800609601219,
        AUTHORITY["EPSG","9003"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","2225"]]


WKT1:ESRI string:
PROJCS["NAD_1983_StatePlane_California_I_FIPS_0401_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",
6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",
0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",
6561666.667],PARAMETER["False_Northing",
1640416.667],PARAMETER["Central_Meridian",-122.0],PARAMETER["Standard_Parallel_1",
41.6666666666667],PARAMETER["Standard_Parallel_2",
40.0],PARAMETER["Latitude_Of_Origin",39.3333333333333],UNIT["US survey foot",
0.304800609601219]]


I selfishly implemented "only" those 2 variants to accommodate GDAL needs.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the PROJ mailing list