aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/proj/internal/coordinateoperation_constants.hpp3
-rw-r--r--include/proj/internal/esri_projection_mappings.hpp42
-rw-r--r--scripts/build_esri_projection_mapping.py114
-rw-r--r--test/unit/test_io.cpp41
4 files changed, 144 insertions, 56 deletions
diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp
index d39ad2ed..f3291272 100644
--- a/include/proj/internal/coordinateoperation_constants.hpp
+++ b/include/proj/internal/coordinateoperation_constants.hpp
@@ -796,6 +796,9 @@ static const MethodMapping projectionMethodMappings[] = {
{"Quartic Authalic", 0, "Quartic_Authalic", "qua_aut", nullptr,
paramsLonNatOrigin},
+ {"Transverse Cylindrical Equal Area", 0,
+ "Transverse_Cylindrical_Equal_Area", "tcea", nullptr, paramsObliqueStereo},
+
{EPSG_NAME_METHOD_EQUAL_EARTH, EPSG_CODE_METHOD_EQUAL_EARTH, nullptr,
"eqearth", nullptr, paramsLonNatOrigin},
diff --git a/include/proj/internal/esri_projection_mappings.hpp b/include/proj/internal/esri_projection_mappings.hpp
index 5f1e1874..1fd3788c 100644
--- a/include/proj/internal/esri_projection_mappings.hpp
+++ b/include/proj/internal/esri_projection_mappings.hpp
@@ -848,6 +848,42 @@ static const ESRIParamMapping paramsESRI_Mercator_Auxiliary_Sphere[] = {
{"Auxiliary_Sphere_Type", nullptr, 0, "0.0", false},
{nullptr, nullptr, 0, "0.0", false}};
+static const ESRIParamMapping paramsESRI_Mercator_Variant_A[] = {
+ {"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
+ EPSG_CODE_PARAMETER_FALSE_EASTING, "0.0", false},
+ {"False_Northing", EPSG_NAME_PARAMETER_FALSE_NORTHING,
+ EPSG_CODE_PARAMETER_FALSE_NORTHING, "0.0", false},
+ {"Central_Meridian", EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, "0.0", false},
+ {"Scale_Factor", EPSG_NAME_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN, "0.0", false},
+ {nullptr, nullptr, 0, "0.0", false}};
+
+static const ESRIParamMapping paramsESRI_Mercator_Variant_C[] = {
+ {"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
+ EPSG_CODE_PARAMETER_FALSE_EASTING, "0.0", false},
+ {"False_Northing", EPSG_NAME_PARAMETER_FALSE_NORTHING,
+ EPSG_CODE_PARAMETER_FALSE_NORTHING, "0.0", false},
+ {"Central_Meridian", EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, "0.0", false},
+ {"Standard_Parallel_1", EPSG_NAME_PARAMETER_LATITUDE_1ST_STD_PARALLEL,
+ EPSG_CODE_PARAMETER_LATITUDE_1ST_STD_PARALLEL, "0.0", false},
+ {"Latitude_Of_Origin", nullptr, 0, "0.0", false},
+ {nullptr, nullptr, 0, "0.0", false}};
+
+static const ESRIParamMapping paramsESRI_Transverse_Cylindrical_Equal_Area[] = {
+ {"False_Easting", EPSG_NAME_PARAMETER_FALSE_EASTING,
+ EPSG_CODE_PARAMETER_FALSE_EASTING, "0.0", false},
+ {"False_Northing", EPSG_NAME_PARAMETER_FALSE_NORTHING,
+ EPSG_CODE_PARAMETER_FALSE_NORTHING, "0.0", false},
+ {"Central_Meridian", EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN, "0.0", false},
+ {"Scale_Factor", EPSG_NAME_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN, "0.0", false},
+ {"Latitude_Of_Origin", EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN,
+ EPSG_CODE_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN, "0.0", false},
+ {nullptr, nullptr, 0, "0.0", false}};
+
static const ESRIMethodMapping esriMappings[] = {
{"Plate_Carree", EPSG_NAME_METHOD_EQUIDISTANT_CYLINDRICAL,
EPSG_CODE_METHOD_EQUIDISTANT_CYLINDRICAL, paramsESRI_Plate_Carree},
@@ -997,6 +1033,12 @@ static const ESRIMethodMapping esriMappings[] = {
EPSG_NAME_METHOD_POPULAR_VISUALISATION_PSEUDO_MERCATOR,
EPSG_CODE_METHOD_POPULAR_VISUALISATION_PSEUDO_MERCATOR,
paramsESRI_Mercator_Auxiliary_Sphere},
+ {"Mercator_Variant_A", EPSG_NAME_METHOD_MERCATOR_VARIANT_A,
+ EPSG_CODE_METHOD_MERCATOR_VARIANT_A, paramsESRI_Mercator_Variant_A},
+ {"Mercator_Variant_C", EPSG_NAME_METHOD_MERCATOR_VARIANT_B,
+ EPSG_CODE_METHOD_MERCATOR_VARIANT_B, paramsESRI_Mercator_Variant_C},
+ {"Transverse_Cylindrical_Equal_Area", "Transverse Cylindrical Equal Area",
+ 0, paramsESRI_Transverse_Cylindrical_Equal_Area},
};
// ---------------------------------------------------------------------------
diff --git a/scripts/build_esri_projection_mapping.py b/scripts/build_esri_projection_mapping.py
index 81e5240d..6f12c05b 100644
--- a/scripts/build_esri_projection_mapping.py
+++ b/scripts/build_esri_projection_mapping.py
@@ -450,8 +450,6 @@ config_str = """
- False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
-# Hammer_Aitoff: not handled
-
- Flat_Polar_Quartic:
WKT2_name: PROJ_WKT2_NAME_METHOD_FLAT_POLAR_QUARTIC
Params:
@@ -510,8 +508,6 @@ config_str = """
Cond:
- EPSG_NAME_PARAMETER_LATITUDE_STD_PARALLEL < 0
-# Fuller: not handled
-
- Rectified_Skew_Orthomorphic_Natural_Origin:
WKT2_name: EPSG_NAME_METHOD_HOTINE_OBLIQUE_MERCATOR_VARIANT_A
Params:
@@ -535,14 +531,6 @@ config_str = """
- Latitude_Of_Center: EPSG_NAME_PARAMETER_LATITUDE_PROJECTION_CENTRE
- XY_Plane_Rotation: EPSG_NAME_PARAMETER_ANGLE_RECTIFIED_TO_SKEW_GRID
-# Cube: not handled
-
-# Transverse_Mercator_Complex: not handled
-
-# Robinson_ARC_INFO: not handled
-
-# Local: not handled
-
- Goode_Homolosine:
WKT2_name: "Goode Homolosine"
Params:
@@ -550,8 +538,6 @@ config_str = """
- False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
-# Berghaus_Star: not handled
-
- Equidistant_Cylindrical_Ellipsoidal:
WKT2_name: EPSG_NAME_METHOD_EQUIDISTANT_CYLINDRICAL
Params:
@@ -560,8 +546,6 @@ config_str = """
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
- Standard_Parallel_1: EPSG_NAME_PARAMETER_LATITUDE_1ST_STD_PARALLEL
-# Ney_Modified_Conic: not handled
-
- Laborde_Oblique_Mercator:
WKT2_name: EPSG_NAME_METHOD_LABORDE_OBLIQUE_MERCATOR
Params:
@@ -572,8 +556,6 @@ config_str = """
- Longitude_Of_Center: EPSG_NAME_PARAMETER_LONGITUDE_PROJECTION_CENTRE
- Latitude_Of_Center: EPSG_NAME_PARAMETER_LATITUDE_PROJECTION_CENTRE
-# IGAC_Plano_Cartesiano: not handled
-
- Gnomonic_Ellipsoidal:
WKT2_name: PROJ_WKT2_NAME_METHOD_GNOMONIC
Params:
@@ -582,22 +564,6 @@ config_str = """
- Longitude_Of_Center: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
- Latitude_Of_Center: EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN
-# Polar_Stereographic_Variant_A: not handled, no example in .csv
-
-# Polar_Stereographic_Variant_B: not handled, no example in .csv
-
-# Polar_Stereographic_Variant_C: not handled
-
-# Mercator_Variant_A: not handled, no example in .csv
-
-# Mercator_Variant_C: not handled, no example in .csv
-
-# Hammer_Ellipsoidal: not handled
-
-# Quartic_Authalic_Ellipsoidal: not handled, no example in .csv
-
-# Eckert_Greifendorff: not handled
-
- Wagner_IV:
WKT2_name: PROJ_WKT2_NAME_METHOD_WAGNER_IV
Params:
@@ -648,12 +614,6 @@ config_str = """
- False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
- Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
-# Transverse_Mercator_NGA_2014: not handled
-
-# Transverse_Cylindrical_Equal_Area: not handled
-
-# Aspect_Adaptive_Cylindrical: not handled
-
- Geostationary_Satellite:
WKT2_name: PROJ_WKT2_NAME_METHOD_GEOSTATIONARY_SATELLITE_SWEEP_Y
Params:
@@ -663,8 +623,6 @@ config_str = """
- Height: "Satellite Height"
- Option: 0.0
-# Equidistant_Cylindrical_Auxiliary_Sphere: not handled
-
- Mercator_Auxiliary_Sphere:
WKT2_name: EPSG_NAME_METHOD_POPULAR_VISUALISATION_PSEUDO_MERCATOR
Params:
@@ -674,23 +632,67 @@ config_str = """
- Standard_Parallel_1: EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN
- Auxiliary_Sphere_Type: 0.0
-# Mollweide_Auxiliary_Sphere: not handled
-
-# Eckert_VI_Auxiliary_Sphere: not handled
-
-# Eckert_IV_Auxiliary_Sphere: not handled
-
-# Stereographic_Auxiliary_Sphere: not handled
-
-# Van_der_Grinten_I_Auxiliary_Sphere: not handled
-
-# Azimuthal_Equidistant_Auxiliary_Sphere: not handled
+- Mercator_Variant_A:
+ WKT2_name: EPSG_NAME_METHOD_MERCATOR_VARIANT_A
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
+ - Scale_Factor: EPSG_NAME_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN
-# Lambert_Azimuthal_Equal_Area_Auxiliary_Sphere: not handled
+- Mercator_Variant_C:
+ WKT2_name: EPSG_NAME_METHOD_MERCATOR_VARIANT_B
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
+ - Standard_Parallel_1: EPSG_NAME_PARAMETER_LATITUDE_1ST_STD_PARALLEL
+ - Latitude_Of_Origin: 0
-# Orthographic_Auxiliary_Sphere: not handled
+- Transverse_Cylindrical_Equal_Area:
+ WKT2_name: Transverse Cylindrical Equal Area
+ Params:
+ - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING
+ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING
+ - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN
+ - Scale_Factor: EPSG_NAME_PARAMETER_SCALE_FACTOR_AT_NATURAL_ORIGIN
+ - Latitude_Of_Origin: EPSG_NAME_PARAMETER_LATITUDE_OF_NATURAL_ORIGIN
-# Gnomonic_Auxiliary_Sphere: not handled
+# Missing/unclear mappings
+
+# Hammer_Aitoff: possibly hammer?
+# Hammer_Ellipsoidal: possibly hammer?
+# Eckert_Greifendorff: +proj=hammer +W=0.25 +M=1
+
+# Missing mappings
+
+# Transverse_Mercator_NGA_2014: utm -- tricky mapping from Central_Meridian to zone
+# Polar_Stereographic_Variant_A: ups -- tricky mapping from Latitude_Of_Origin to "+south" when required
+
+# The following methods are not currently possible in PROJ:
+
+# Ney_Modified_Conic
+# IGAC_Plano_Cartesiano
+# Fuller
+# Berghaus_Star
+# Cube
+# Transverse_Mercator_Complex
+# Robinson_ARC_INFO
+# Local
+# Equidistant_Cylindrical_Auxiliary_Sphere
+# Aspect_Adaptive_Cylindrical
+# Mollweide_Auxiliary_Sphere
+# Eckert_VI_Auxiliary_Sphere
+# Eckert_IV_Auxiliary_Sphere
+# Stereographic_Auxiliary_Sphere
+# Van_der_Grinten_I_Auxiliary_Sphere
+# Azimuthal_Equidistant_Auxiliary_Sphere
+# Lambert_Azimuthal_Equal_Area_Auxiliary_Sphere
+# Orthographic_Auxiliary_Sphere
+# Gnomonic_Auxiliary_Sphere
+# Polar_Stereographic_Variant_B
+# Polar_Stereographic_Variant_C
+# Quartic_Authalic_Ellipsoidal
"""
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 884b52f2..581083b3 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -5002,6 +5002,47 @@ static const struct {
{"False northing", 2},
}},
+ {"Mercator_Variant_A",
+ {{"False_Easting", 1},
+ {"False_Northing", 2},
+ {"Scale_Factor", 3},
+ {"Central_Meridian", 4}},
+ "Mercator (variant A)",
+ {
+ {"Longitude of natural origin", 4},
+ {"Scale factor at natural origin", 3},
+ {"False easting", 1},
+ {"False northing", 2},
+ }},
+
+ {"Mercator_Variant_C",
+ {{"False_Easting", 1},
+ {"False_Northing", 2},
+ {"Standard_Parallel_1", 3},
+ {"Central_Meridian", 4}},
+ "Mercator (variant B)",
+ {
+ {"Latitude of 1st standard parallel", 3},
+ {"Longitude of natural origin", 4},
+ {"False easting", 1},
+ {"False northing", 2},
+ }},
+
+ {"Transverse_Cylindrical_Equal_Area",
+ {{"False_Easting", 1},
+ {"False_Northing", 2},
+ {"Central_Meridian", 3},
+ {"Scale_Factor", 4},
+ {"Latitude_Of_Origin", 5}},
+ "Transverse Cylindrical Equal Area",
+ {
+ {"Latitude of natural origin", 5},
+ {"Longitude of natural origin", 3},
+ {"Scale factor at natural origin", 4},
+ {"False easting", 1},
+ {"False northing", 2},
+ }},
+
{"Gnomonic_Ellipsoidal",
{{"False_Easting", 1},
{"False_Northing", 2},