3

It is tricky to manage the extent of a coordinate system when that extent is not an aligned rectangle in another coordinate system.

For example consider Thursday Island, located at:

  • 142.2°, -10.2° (WGS84, EPSG:4326) or equivalently,
  • 1146km, -1156.5km (Australian Albers projection, EPSG:3577).

According to SpatialReference.org (similar values to epsg.io) this latter projection has:

  • WGS84 Bounds: 108.0000, -45.0000, 155.0000, -10.0000
  • Projected Bounds: -2690013.3995, -5098960.4467, 2579169.8548, -1281018.4757

Notice that Thursday Island is well inside of the lat/lon bounds, however it (along with sections of Australian mainland at both Cape York Peninsula and Kakadu) falls outside of the projected bounds.

Say I want to create a web map application using OpenLayers, I need to know the maximum extent of the map in the projected coordinates. The problem is that if I source this information from a standard online reference, I will mistakenly cut off parts of Australia even when choosing a projection that was specifically designed to cover Australia.

Presumably the root cause is that the extent has been represented by an aligned bounding-box and then, rather than transforming the entire boundary of this region precisely (before generating a new bounding box), only two vertices of the box have been properly projected (the bottom-left and top-right corners). Such a method is invalid due to curvature/nonlinearity.

How is this problem normally handled? Is there any authorative source for the extent of a map projection? In particular, is Proj.4 able to report the maximum domain of validity for a transformation? I'd like a solution that works in all cases, including those where the region of validity does not resemble a rectangular coordinate patch (e.g. rHEALPix and QSC).

0

1 Answer 1

6

EPSG Geodetic Parameter Dataset

For EPSG-based projections, the official source is https://epsg.org, for example EPSG:3577:

epsg.org

A former website from the same organization, epsg-registry.org, is no longer accessible.


SpatialReference.org

SpatialReference.org (code) was updated in 2024 alongside PROJ development, which means it is a valuable web resource for most spatial references, for example EPSG:3577:

SpatialReference.org

An older version of the website (when the question was asked) was based on older datasets, and had different/incorrect bounds.


EPSG.io

A non-official EPSG.io website (code) has converted the EPSG registry to a SQLite db (gml.sqlite), which is queried to extract the XML and show the same information. You can also fetch a "bbox" from their API, e.g. https://epsg.io/?q=3577&format=json

"bbox": [-9.86,112.85,-43.7,153.69]

Note this website is often out-of-date with respect to the official EPSG.org and/or SpatialReference.org websites.


PROJ version 6+

If you have a newer version of PROJ (version 6 or later), use projinfo to extract a WKT2_2018 string:

$ projinfo -o WKT2_2018 EPSG:3577
WKT2_2018 string:
PROJCRS["GDA94 / Australian Albers",
    BASEGEOGCRS["GDA94",
        DATUM["Geocentric Datum of Australia 1994",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4283]],
    CONVERSION["Australian Albers",
        METHOD["Albers Equal Area",
            ID["EPSG",9822]],
        PARAMETER["Latitude of false origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",132,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",-18,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",-36,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["unknown"],
        AREA["Australia - onshore"],
        BBOX[-43.7,112.85,-9.86,153.69]],
    ID["EPSG",3577]]

See the USAGE at the bottom for AREA and BBOX.


pyproj

Using pyproj >=2.0, you can access various properties of a CRS in Python:

In [1]: from pyproj import CRS                                                                                                                      

In [2]: crs = CRS.from_epsg(3577)                                                                                                                   

In [3]: crs                                                                                                                                         
Out[3]: 
<Projected CRS: EPSG:3577>
Name: GDA94 / Australian Albers
Axis Info [cartesian]:
- E[east]: Easting (metre)
- N[north]: Northing (metre)
Area of Use:
- name: Australia - onshore
- bounds: (112.85, -43.7, 153.69, -9.86)
Coordinate Operation:
- name: Australian Albers
- method: Albers Equal Area
Datum: Geocentric Datum of Australia 1994
- Ellipsoid: GRS 1980
- Prime Meridian: Greenwich

In [4]: crs.area_of_use                                                                                                                             
Out[4]: AreaOfUse(name=Australia - onshore, west=112.85, south=-43.7, east=153.69, north=-9.86)

In [5]: crs.area_of_use.bounds                                                                                                                      
Out[5]: (112.85, -43.7, 153.69, -9.86)

Polygon extents

If bounding boxes are not enough, you can register a free account and download "Extent Polygons in Shapefile Format", which has many overlapping areas:

world

zooming into the point of interest, highlighting urn:ogc:def:area:EPSG::2575 - Australia - onshore:

australia

This is 1 of nearly 20 different areas defined for different coordinate reference systems at that location.

3
  • So some EPSG codes refer to geocoded polygons rather than to coordinate reference systems, that's interesting.
    – benjimin
    Jan 30 at 7:36
  • Does any definitive extent exist for a CRS? For example, proj seems willing to transform between EPSG3577 even for offshore points. I presume the valid usage area is generally only a subset of the oriented lat/lon bounding box (almost by definition), so a bbox is an incomplete description..
    – benjimin
    Jan 30 at 7:44
  • To get the true point-in-polygon you'd need to get the polygons from epsg.org which needs a log-in. These polygons are not currently used in PROJ, although the use of polygons has been discussed. Only an approximate bbox use extent is used, which would transform offshore points.
    – Mike T
    Jan 30 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.