aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyall Dawson <nyall.dawson@gmail.com>2020-02-21 09:11:18 +1000
committerKristian Evers <kristianevers@gmail.com>2020-02-21 11:26:55 +0100
commitdbe6dcf2479c92bfb268b632c245bd0fc3fb147e (patch)
treebbda808075361b28a1203da83b5e528748e4130e
parentee0ba2d2e61323b5bc02b0e6b307da8dde99f621 (diff)
downloadPROJ-dbe6dcf2479c92bfb268b632c245bd0fc3fb147e.tar.gz
PROJ-dbe6dcf2479c92bfb268b632c245bd0fc3fb147e.zip
Add support for creating coordinates operations using ESRI:53079 (patterson) CRS
-rw-r--r--include/proj/internal/coordinateoperation_constants.hpp3
-rw-r--r--include/proj/internal/esri_projection_mappings.hpp10
-rw-r--r--scripts/build_esri_projection_mapping.py7
-rw-r--r--src/proj_constants.h2
4 files changed, 21 insertions, 1 deletions
diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp
index 55ef0dcc..6b456610 100644
--- a/include/proj/internal/coordinateoperation_constants.hpp
+++ b/include/proj/internal/coordinateoperation_constants.hpp
@@ -709,6 +709,9 @@ static const MethodMapping projectionMethodMappings[] = {
{EPSG_NAME_METHOD_ORTHOGRAPHIC, EPSG_CODE_METHOD_ORTHOGRAPHIC,
"Orthographic", "ortho", nullptr, paramsNatOrigin},
+ {PROJ_WKT2_NAME_METHOD_PATTERSON, 0, "Patterson", "patterson", nullptr,
+ paramsLonNatOrigin},
+
{EPSG_NAME_METHOD_AMERICAN_POLYCONIC, EPSG_CODE_METHOD_AMERICAN_POLYCONIC,
"Polyconic", "poly", nullptr, paramsNatOrigin},
diff --git a/include/proj/internal/esri_projection_mappings.hpp b/include/proj/internal/esri_projection_mappings.hpp
index 3c3e964a..1248a5fa 100644
--- a/include/proj/internal/esri_projection_mappings.hpp
+++ b/include/proj/internal/esri_projection_mappings.hpp
@@ -747,6 +747,15 @@ static const ESRIParamMapping paramsESRI_Wagner_VII[] = {
EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, 0.0},
{nullptr, nullptr, 0, 0.0}};
+static const ESRIParamMapping paramsESRI_Patterson[] = {
+ {"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
+ EPSG_CODE_PARAMETER_FALSE_EASTING, 0.0},
+ {"False_Northing", EPSG_NAME_PARAMETER_FALSE_NORTHING,
+ EPSG_CODE_PARAMETER_FALSE_NORTHING, 0.0},
+ {"Central_Meridian", EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, 0.0},
+ {nullptr, nullptr, 0, 0.0}};
+
static const ESRIParamMapping paramsESRI_Geostationary_Satellite[] = {
{"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
EPSG_CODE_PARAMETER_FALSE_EASTING, 0.0},
@@ -896,6 +905,7 @@ static const ESRIMethodMapping esriMappings[] = {
{"Wagner_IV", PROJ_WKT2_NAME_METHOD_WAGNER_IV, 0, paramsESRI_Wagner_IV},
{"Wagner_V", PROJ_WKT2_NAME_METHOD_WAGNER_V, 0, paramsESRI_Wagner_V},
{"Wagner_VII", PROJ_WKT2_NAME_METHOD_WAGNER_VII, 0, paramsESRI_Wagner_VII},
+ {"Patterson", PROJ_WKT2_NAME_METHOD_PATTERSON, 0, paramsESRI_Patterson},
{"Geostationary_Satellite",
PROJ_WKT2_NAME_METHOD_GEOSTATIONARY_SATELLITE_SWEEP_Y, 0,
paramsESRI_Geostationary_Satellite},
diff --git a/scripts/build_esri_projection_mapping.py b/scripts/build_esri_projection_mapping.py
index 3b251898..0722f7aa 100644
--- a/scripts/build_esri_projection_mapping.py
+++ b/scripts/build_esri_projection_mapping.py
@@ -597,7 +597,12 @@ config_str = """
# Natural_Earth_II: not handled
-# Patterson: not handled
+- Patterson:
+ WKT2_name: PROJ_WKT2_NAME_METHOD_PATTERSON
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
# Compact_Miller: not handled
diff --git a/src/proj_constants.h b/src/proj_constants.h
index 91c7264c..f16f797f 100644
--- a/src/proj_constants.h
+++ b/src/proj_constants.h
@@ -173,6 +173,8 @@
#define EPSG_NAME_METHOD_ORTHOGRAPHIC "Orthographic"
#define EPSG_CODE_METHOD_ORTHOGRAPHIC 9840
+#define PROJ_WKT2_NAME_METHOD_PATTERSON "Patterson"
+
#define EPSG_NAME_METHOD_AMERICAN_POLYCONIC "American Polyconic"
#define EPSG_CODE_METHOD_AMERICAN_POLYCONIC 9818