Skip to content

Commit a11956f

Browse files
committed
fixed wrong geographic coordinate order for gnomonic projection
1 parent 2fb62c1 commit a11956f

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

docs/guides/grid.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"name": "python",
427427
"nbconvert_exporter": "python",
428428
"pygments_lexer": "ipython3",
429-
"version": "3.12.12"
429+
"version": "3.12.3"
430430
}
431431
},
432432
"nbformat": 4,

docs/guides/tiling_system.ipynb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,16 @@
310310
"list(rpts.get_tiles_in_geog_bbox((16, 48, 18, 50), tiling_id=\"my_fine_tiling\"))"
311311
]
312312
},
313+
{
314+
"cell_type": "markdown",
315+
"id": "a52c2501",
316+
"metadata": {},
317+
"source": [
318+
":::{important}\n",
319+
"For a geographical bounding box the order of longitude coordinates is important. As an example: `(-170, 20, 150, 30)` is a large bounding box going from -170° west to 150° east and `(150, 20, -170, 30)` is a small bounding box crossing the antimeridian.\n",
320+
":::"
321+
]
322+
},
313323
{
314324
"cell_type": "markdown",
315325
"id": "2decb0fd",
@@ -356,6 +366,18 @@
356366
"list(rpts.get_tiles_in_geom(ggeom, tiling_id=\"my_fine_tiling\"))"
357367
]
358368
},
369+
{
370+
"cell_type": "markdown",
371+
"id": "08164a91",
372+
"metadata": {},
373+
"source": [
374+
":::{note}\n",
375+
"All geometries passed to `pytileproj` functions and class methods are segmentised to ensure an adequate representation of the geometry in a different projection system. A maximum segment length is defined as\n",
376+
"- 0.1 degree for geographic projections\n",
377+
"- 10 kilometres for metric projections\n",
378+
":::"
379+
]
380+
},
359381
{
360382
"cell_type": "markdown",
361383
"id": "107c4c3c",

src/pytileproj/projgeom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def pyproj_to_cartopy_crs(crs: pyproj.CRS) -> "ccrs.CRS":
215215
false_northing,
216216
standard_parallels,
217217
),
218-
"gnom": ccrs.Gnomonic(central_longitude, central_latitude),
218+
"gnom": ccrs.Gnomonic(central_latitude, central_longitude),
219219
"laea": ccrs.LambertAzimuthalEqualArea(
220220
central_longitude, central_latitude, false_easting, false_northing
221221
),

0 commit comments

Comments
 (0)