Skip to content

switch to epsg.org as data source? #12

@floledermann

Description

@floledermann

The collection of parameters harvested from epsg.io results in parameters that give incorrect results when used in conjunction with proj4JS. The CRS data published at spatialreference.org seems to be more reliable in this regard.

For now it is only anecdotal evidence, but I have identified two cases where this causes incorrect results when using epsg-index:

EPSG:2169

https://epsg.io/2169 gives as a proj4 definition:
+proj=tmerc +lat_0=49.8333333333333 +lon_0=6.16666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-265.8867,76.9851,20.2667,0.33746,3.09264,-2.53861,0.4598 +units=m +no_defs +type=crs

https://spatialreference.org/ref/epsg/2169/ gives:
+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs

(note the diverging towgs84 parameter!)

The latter one seems to be correct, see this thread on Mastodon for the feedback of someone with local knowledge: https://mapstodon.space/@jaykayone/111325366362650226

Simplified test case here: https://observablehq.com/d/841eca8097085b5d , with the definition from spatialreference.org giving the correct result.

EPSG:4312

https://epsg.io/4312 :
+proj=longlat +ellps=bessel +no_defs +type=crs

https://spatialreference.org/ref/epsg/4312/ :
+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs

Again, the latter one is correct, as the first one is missing the crucial towgs84 parameter.

I have no idea what is going on here, or how to reach the maintainers of epsg.io, but these (admittedly anecdotal) data points strongly suggest that epsg.io cannot be trusted as a source for CRS info.

Switching to the data from spatialreference.org should be easy, as the URL pattern https://spatialreference.org/ref/epsg/{epsg_code}/proj4/ will get a text-only response with the proj4 definition.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions