aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-11-09 12:22:48 +0000
committerEven Rouault <even.rouault@spatialys.com>2019-11-09 12:22:48 +0000
commit8fdd512ea8d9e0e788d93c5f356bc3d1728ba2aa (patch)
tree09f6fd9ba369a8b5a6856908014285c437e37e13 /src
parent6e58a6f906190099cbfcec63b9a68f1ef1d14d7c (diff)
downloadPROJ-8fdd512ea8d9e0e788d93c5f356bc3d1728ba2aa.tar.gz
PROJ-8fdd512ea8d9e0e788d93c5f356bc3d1728ba2aa.zip
Doc: document oddity related to identification of CRS from ESRI WKT
Or more generally formulations that don't have an explicit axis order. Refs https://github.com/pyproj4/pyproj/issues/475 projinfo 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]' returns EPSG:4326 with 100% confidence. But its axis order is not the same as EPSG:4326. I've pondered about this, like decreasing the confidence of the match, but this would have downstream effects on GDAL (shapefiles with the above content in a .prj would no longer be identified as EPSG:4326). So for now, document that oddity.
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/c_api.cpp24
-rw-r--r--src/iso19111/crs.cpp55
2 files changed, 58 insertions, 21 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index c99eb12c..fb3b7f40 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -2101,14 +2101,26 @@ PJ *proj_get_target_crs(PJ_CONTEXT *ctx, const PJ *obj) {
* The method returns a list of matching reference CRS, and the percentage
* (0-100) of confidence in the match. The list is sorted by decreasing
* confidence.
- *
- * 100% means that the name of the reference entry
+ * <ul>
+ * <li>100% means that the name of the reference entry
* perfectly matches the CRS name, and both are equivalent. In which case a
* single result is returned.
- * 90% means that CRS are equivalent, but the names are not exactly the same.
- * 70% means that CRS are equivalent), but the names do not match at all.
- * 25% means that the CRS are not equivalent, but there is some similarity in
- * the names.
+ * Note: in the case of a GeographicCRS whose axis
+ * order is implicit in the input definition (for example ESRI WKT), then axis
+ * order is ignored for the purpose of identification. That is the CRS built
+ * from
+ * GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],
+ * PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
+ * will be identified to EPSG:4326, but will not pass a
+ * isEquivalentTo(EPSG_4326, util::IComparable::Criterion::EQUIVALENT) test,
+ * but rather isEquivalentTo(EPSG_4326,
+ * util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS)
+ * </li>
+ * <li>90% means that CRS are equivalent, but the names are not exactly the same.</li>
+ * <li>70% means that CRS are equivalent), but the names do not match at all.</li>
+ * <li>25% means that the CRS are not equivalent, but there is some similarity in
+ * the names.</li>
+ * </ul>
* Other confidence values may be returned by some specialized implementations.
*
* This is implemented for GeodeticCRS, ProjectedCRS, VerticalCRS and
diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp
index a13662cd..46cde43a 100644
--- a/src/iso19111/crs.cpp
+++ b/src/iso19111/crs.cpp
@@ -697,14 +697,26 @@ CRSNNPtr CRS::normalizeForVisualization() const {
* The method returns a list of matching reference CRS, and the percentage
* (0-100) of confidence in the match. The list is sorted by decreasing
* confidence.
- *
- * 100% means that the name of the reference entry
+ * <ul>
+ * <li>100% means that the name of the reference entry
* perfectly matches the CRS name, and both are equivalent. In which case a
* single result is returned.
- * 90% means that CRS are equivalent, but the names are not exactly the same.
- * 70% means that CRS are equivalent), but the names do not match at all.
- * 25% means that the CRS are not equivalent, but there is some similarity in
- * the names.
+ * Note: in the case of a GeographicCRS whose axis
+ * order is implicit in the input definition (for example ESRI WKT), then axis
+ * order is ignored for the purpose of identification. That is the CRS built
+ * from
+ * GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],
+ * PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
+ * will be identified to EPSG:4326, but will not pass a
+ * isEquivalentTo(EPSG_4326, util::IComparable::Criterion::EQUIVALENT) test,
+ * but rather isEquivalentTo(EPSG_4326,
+ * util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS)
+ * </li>
+ * <li>90% means that CRS are equivalent, but the names are not exactly the same.</li>
+ * <li>70% means that CRS are equivalent), but the names do not match at all.</li>
+ * <li>25% means that the CRS are not equivalent, but there is some similarity in
+ * the names.</li>
+ * </ul>
* Other confidence values may be returned by some specialized implementations.
*
* This is implemented for GeodeticCRS, ProjectedCRS, VerticalCRS and
@@ -1554,17 +1566,30 @@ static bool hasCodeCompatibleOfAuthorityFactory(
* authorityFactory is not null.
*
* The method returns a list of matching reference CRS, and the percentage
- * (0-100) of confidence in the match.
- * 100% means that the name of the reference entry
+ * (0-100) of confidence in the match:
+ * <ul>
+ * <li>100% means that the name of the reference entry
* perfectly matches the CRS name, and both are equivalent. In which case a
* single result is returned.
- * 90% means that CRS are equivalent, but the names are not exactly the same.
- * 70% means that CRS are equivalent (equivalent datum and coordinate system),
- * but the names do not match at all.
- * 60% means that ellipsoid, prime meridian and coordinate systems are
- * equivalent, but the CRS and datum names do not match.
- * 25% means that the CRS are not equivalent, but there is some similarity in
- * the names.
+ * Note: in the case of a GeographicCRS whose axis
+ * order is implicit in the input definition (for example ESRI WKT), then axis
+ * order is ignored for the purpose of identification. That is the CRS built
+ * from
+ * GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],
+ * PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
+ * will be identified to EPSG:4326, but will not pass a
+ * isEquivalentTo(EPSG_4326, util::IComparable::Criterion::EQUIVALENT) test,
+ * but rather isEquivalentTo(EPSG_4326,
+ * util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS)
+ * </li>
+ * <li>90% means that CRS are equivalent, but the names are not exactly the same.
+ * <li>70% means that CRS are equivalent (equivalent datum and coordinate system),
+ * but the names do not match at all.</li>
+ * <li>60% means that ellipsoid, prime meridian and coordinate systems are
+ * equivalent, but the CRS and datum names do not match.</li>
+ * <li>25% means that the CRS are not equivalent, but there is some similarity in
+ * the names.</li>
+ * </ul>
*
* @param authorityFactory Authority factory (or null, but degraded
* functionality)