Skip to content

Commit

Permalink
if-else linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kdpenner committed Jul 4, 2022
1 parent fa4d573 commit 563b2fe
Showing 1 changed file with 42 additions and 43 deletions.
85 changes: 42 additions & 43 deletions pyproj/crs/coordinate_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,49 +704,48 @@ def __new__(
raise CRSError(
"This conversion is defined for only latitude_natural_origin = 0."
)
else:
merc_json = {
"$schema": "https://proj.org/schemas/v0.2/projjson.schema.json",
"type": "Conversion",
"name": "unknown",
"method": {
"name": "Mercator (variant A)",
"id": {"authority": "EPSG", "code": 9804},
},
"parameters": [
{
"name": "Latitude of natural origin",
"value": latitude_natural_origin,
"unit": "degree",
"id": {"authority": "EPSG", "code": 8801},
},
{
"name": "Longitude of natural origin",
"value": longitude_natural_origin,
"unit": "degree",
"id": {"authority": "EPSG", "code": 8802},
},
{
"name": "Scale factor at natural origin",
"value": scale_factor_natural_origin,
"unit": "unity",
"id": {"authority": "EPSG", "code": 8805},
},
{
"name": "False easting",
"value": false_easting,
"unit": "metre",
"id": {"authority": "EPSG", "code": 8806},
},
{
"name": "False northing",
"value": false_northing,
"unit": "metre",
"id": {"authority": "EPSG", "code": 8807},
},
],
}
return cls.from_json_dict(merc_json)
merc_json = {
"$schema": "https://proj.org/schemas/v0.2/projjson.schema.json",
"type": "Conversion",
"name": "unknown",
"method": {
"name": "Mercator (variant A)",
"id": {"authority": "EPSG", "code": 9804},
},
"parameters": [
{
"name": "Latitude of natural origin",
"value": latitude_natural_origin,
"unit": "degree",
"id": {"authority": "EPSG", "code": 8801},
},
{
"name": "Longitude of natural origin",
"value": longitude_natural_origin,
"unit": "degree",
"id": {"authority": "EPSG", "code": 8802},
},
{
"name": "Scale factor at natural origin",
"value": scale_factor_natural_origin,
"unit": "unity",
"id": {"authority": "EPSG", "code": 8805},
},
{
"name": "False easting",
"value": false_easting,
"unit": "metre",
"id": {"authority": "EPSG", "code": 8806},
},
{
"name": "False northing",
"value": false_northing,
"unit": "metre",
"id": {"authority": "EPSG", "code": 8807},
},
],
}
return cls.from_json_dict(merc_json)


class MercatorBConversion(CoordinateOperation):
Expand Down

0 comments on commit 563b2fe

Please sign in to comment.