diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-04 14:35:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-04 14:35:18 +0100 |
| commit | c1fbdd88b3898279abc6a834254df15070fca39b (patch) | |
| tree | cc4b3e0738913763c0a4ab58ded6d507f8c4a51f /scripts | |
| parent | 72f5bb21ae35999b4994766e47b81900e8826c33 (diff) | |
| parent | cb64ce26221811bc19c362e0950dc2b057e5b757 (diff) | |
| download | PROJ-c1fbdd88b3898279abc6a834254df15070fca39b.tar.gz PROJ-c1fbdd88b3898279abc6a834254df15070fca39b.zip | |
Merge pull request #1986 from nyalldawson/behrman
Map the Behrman projection to cae when converting ESRI CRSes
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build_esri_projection_mapping.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/build_esri_projection_mapping.py b/scripts/build_esri_projection_mapping.py index 216701a9..81e5240d 100644 --- a/scripts/build_esri_projection_mapping.py +++ b/scripts/build_esri_projection_mapping.py @@ -159,7 +159,17 @@ config_str = """ - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING - Central_Meridian: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN -# Behrmann: not handled +- Behrmann: + WKT2_name: EPSG_NAME_METHOD_LAMBERT_CYLINDRICAL_EQUAL_AREA_SPHERICAL + Params: + - False_Easting: EPSG_NAME_PARAMETER_FALSE_EASTING + - False_Northing: EPSG_NAME_PARAMETER_FALSE_NORTHING + - Central_Meridian: + Name: EPSG_NAME_PARAMETER_LONGITUDE_OF_NATURAL_ORIGIN + Default: 0.0 + - Standard_Parallel_1: + Name: EPSG_NAME_PARAMETER_LATITUDE_1ST_STD_PARALLEL + Default: 30.0 - Winkel_I: WKT2_name: "Winkel I" @@ -701,14 +711,20 @@ def generate_mapping(WKT2_name, esri_proj_name, Params, suffix=''): for param in Params: for param_name in param: param_value = param[param_name] + + default_value = None + if isinstance(param_value, dict): + default_value = param_value.get('Default', None) + param_value = param_value['Name'] + if isinstance(param_value, str): if param_value.startswith('EPSG_'): - print(' { "%s", %s, %s, 0.0 },' % (param_name, param_value, param_value.replace('_NAME_', '_CODE_'))) + print(' { "%s", %s, %s, "%.1f", %s },' % (param_name, param_value, param_value.replace('_NAME_', '_CODE_'), default_value or 0.0, "true" if default_value is not None else "false")) else: - print(' { "%s", "%s", 0, 0.0 },' % (param_name, param_value)) + print(' { "%s", "%s", 0, "%.1f", %s },' % (param_name, param_value, default_value or 0.0, "true" if default_value is not None else "false")) else: - print(' { "%s", nullptr, 0, %.1f },' % (param_name, param_value)) - print(' { nullptr, nullptr, 0, 0.0 }') + print(' { "%s", nullptr, 0, "%.1f", false },' % (param_name, param_value)) + print(' { nullptr, nullptr, 0, "0.0", false }') print('};') |
