aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyall Dawson <nyall.dawson@gmail.com>2020-02-21 09:45:47 +1000
committerKristian Evers <kristianevers@gmail.com>2020-02-21 11:26:55 +0100
commit6aedfb204a2ff09998dae6bd3731a1f18f85ef14 (patch)
treefe16bce0567c1101582e8a146f2e804c3fd42d40
parent0bc2ae258dc928052719cc85b9f01957e4541fc5 (diff)
downloadPROJ-6aedfb204a2ff09998dae6bd3731a1f18f85ef14.tar.gz
PROJ-6aedfb204a2ff09998dae6bd3731a1f18f85ef14.zip
Add support for creating coordinates operations using Compact Miller,
Times and Vertical Near Side Perspective projections
-rw-r--r--include/proj/internal/coordinateoperation_constants.hpp9
-rw-r--r--include/proj/internal/esri_projection_mappings.hpp33
-rw-r--r--scripts/build_esri_projection_mapping.py21
-rw-r--r--src/proj_constants.h6
4 files changed, 66 insertions, 3 deletions
diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp
index c3ae77ee..bc8f1208 100644
--- a/include/proj/internal/coordinateoperation_constants.hpp
+++ b/include/proj/internal/coordinateoperation_constants.hpp
@@ -585,6 +585,9 @@ static const MethodMapping projectionMethodMappings[] = {
{EPSG_NAME_METHOD_BONNE, EPSG_CODE_METHOD_BONNE, "Bonne", "bonne", nullptr,
paramsBonne},
+ {PROJ_WKT2_NAME_METHOD_COMPACT_MILLER, 0, "Compact_Miller", "comill",
+ nullptr, paramsLonNatOrigin},
+
{EPSG_NAME_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL,
EPSG_CODE_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL,
"Cylindrical_Equal_Area", "cea", nullptr, paramsCEA},
@@ -738,9 +741,15 @@ static const MethodMapping projectionMethodMappings[] = {
{PROJ_WKT2_NAME_METHOD_STEREOGRAPHIC, 0, "Stereographic", "stere", nullptr,
paramsObliqueStereo},
+ {PROJ_WKT2_NAME_METHOD_TIMES, 0, "Times", "times", nullptr,
+ paramsLonNatOrigin},
+
{PROJ_WKT2_NAME_METHOD_VAN_DER_GRINTEN, 0, "VanDerGrinten", "vandg", "R_A",
paramsLonNatOrigin},
+ {PROJ_WKT2_NAME_METHOD_VERTICAL_NEAR_SIDE_PERSPECTIVE, 0,
+ "Vertical_Near_Side_Perspective", "nsper", nullptr, paramsLonNatOrigin},
+
{PROJ_WKT2_NAME_METHOD_WAGNER_I, 0, "Wagner_I", "wag1", nullptr,
paramsLonNatOrigin},
diff --git a/include/proj/internal/esri_projection_mappings.hpp b/include/proj/internal/esri_projection_mappings.hpp
index 67e226ed..b916e0c2 100644
--- a/include/proj/internal/esri_projection_mappings.hpp
+++ b/include/proj/internal/esri_projection_mappings.hpp
@@ -616,6 +616,24 @@ static const ESRIParamMapping paramsESRI_Gnomonic[] = {
EPSG_CODE_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN, 0.0},
{nullptr, nullptr, 0, 0.0}};
+static const ESRIParamMapping paramsESRI_Times[] = {
+ {"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_Vertical_Near_Side_Perspective[] = {
+ {"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_Stereographic_North_Pole[] = {
{"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
EPSG_CODE_PARAMETER_FALSE_EASTING, 0.0},
@@ -774,6 +792,15 @@ static const ESRIParamMapping paramsESRI_Patterson[] = {
EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, 0.0},
{nullptr, nullptr, 0, 0.0}};
+static const ESRIParamMapping paramsESRI_Compact_Miller[] = {
+ {"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 +923,10 @@ static const ESRIMethodMapping esriMappings[] = {
{"Aitoff", "Aitoff", 0, paramsESRI_Aitoff},
{"Craster_Parabolic", "Craster Parabolic", 0, paramsESRI_Craster_Parabolic},
{"Gnomonic", PROJ_WKT2_NAME_METHOD_GNOMONIC, 0, paramsESRI_Gnomonic},
+ {"Times", PROJ_WKT2_NAME_METHOD_TIMES, 0, paramsESRI_Times},
+ {"Vertical_Near_Side_Perspective",
+ PROJ_WKT2_NAME_METHOD_VERTICAL_NEAR_SIDE_PERSPECTIVE, 0,
+ paramsESRI_Vertical_Near_Side_Perspective},
{"Stereographic_North_Pole", EPSG_NAME_METHOD_POLAR_STEREOGRAPHIC_VARIANT_B,
EPSG_CODE_METHOD_POLAR_STEREOGRAPHIC_VARIANT_B,
paramsESRI_Stereographic_North_Pole},
@@ -928,6 +959,8 @@ static const ESRIMethodMapping esriMappings[] = {
{"Natural_Earth_II", PROJ_WKT2_NAME_METHOD_NATURAL_EARTH_II, 0,
paramsESRI_Natural_Earth_II},
{"Patterson", PROJ_WKT2_NAME_METHOD_PATTERSON, 0, paramsESRI_Patterson},
+ {"Compact_Miller", PROJ_WKT2_NAME_METHOD_COMPACT_MILLER, 0,
+ paramsESRI_Compact_Miller},
{"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 9a3c90b6..8d16ca24 100644
--- a/scripts/build_esri_projection_mapping.py
+++ b/scripts/build_esri_projection_mapping.py
@@ -459,9 +459,19 @@ config_str = """
- Longitude_Of_Center: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
- Latitude_Of_Center: EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN
-# Times: not handled, but present in PROJ
+- Times:
+ WKT2_name: PROJ_WKT2_NAME_METHOD_TIMES
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
-# Vertical_Near_Side_Perspective: not handled, but present in PROJ
+- Vertical_Near_Side_Perspective:
+ WKT2_name: PROJ_WKT2_NAME_METHOD_VERTICAL_NEAR_SIDE_PERSPECTIVE
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
- Stereographic_North_Pole:
WKT2_name: EPSG_NAME_METHOD_POLAR_STEREOGRAPHIC_VARIANT_B
@@ -614,7 +624,12 @@ config_str = """
- False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
-# Compact_Miller: not handled
+- Compact_Miller:
+ WKT2_name: PROJ_WKT2_NAME_METHOD_COMPACT_MILLER
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
# Transverse_Mercator_NGA_2014: not handled
diff --git a/src/proj_constants.h b/src/proj_constants.h
index b1059d89..a70d5346 100644
--- a/src/proj_constants.h
+++ b/src/proj_constants.h
@@ -75,6 +75,8 @@
#define EPSG_NAME_METHOD_BONNE "Bonne"
#define EPSG_CODE_METHOD_BONNE 9827
+#define PROJ_WKT2_NAME_METHOD_COMPACT_MILLER "Compact Miller"
+
#define EPSG_NAME_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL \
"Lambert Cylindrical Equal Area (Spherical)"
#define EPSG_CODE_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL 9834
@@ -195,8 +197,12 @@
#define PROJ_WKT2_NAME_METHOD_STEREOGRAPHIC "Stereographic"
+#define PROJ_WKT2_NAME_METHOD_TIMES "Times"
+
#define PROJ_WKT2_NAME_METHOD_VAN_DER_GRINTEN "Van Der Grinten"
+#define PROJ_WKT2_NAME_METHOD_VERTICAL_NEAR_SIDE_PERSPECTIVE "Vertical Near Side Perspective"
+
#define PROJ_WKT2_NAME_METHOD_WAGNER_I "Wagner I"
#define PROJ_WKT2_NAME_METHOD_WAGNER_II "Wagner II"
#define PROJ_WKT2_NAME_METHOD_WAGNER_III "Wagner III"