3

I'm trying to find a source of information with the default units (meters, ft, ftUS) associated with an EPSG code. I'm currently using https://spatialreference.org/ and fetching URLs like this:

http://spatialreference.org/ref/epsg/2284/proj4/

And then looking at the to_meter field to see if it's ft ftUs or m.

The problem is that the site seems to be incomplete for example they don't have EPSG:6505

http://spatialreference.org/ref/epsg/6505/proj4/

6

3 Answers 3

4

The official resource for EPSG codes is http://www.epsg.org/. You can either download the whole dataset or use the online registry http://www.epsg-registry.org/ that is unfortunately not very user friendly. All other sites are still only more or less accurate copies

The definition of EPSG:6505 captured from http://www.epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::6505

PROJCRS["NAD83(2011) / Minnesota South (ftUS)",
  BASEGEODCRS["NAD83(2011)",
    DATUM["NAD83 (National Spatial Reference System 2011)",
      ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1.0]]]],
  CONVERSION["SPCS83 Minnesota South zone (US Survey feet)",
    METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],
    PARAMETER["Latitude of false origin",43,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Longitude of false origin",-94,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Latitude of 1st standard parallel",45.216666666667,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Latitude of 2nd standard parallel",43.783333333333,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Easting at false origin",2624666.6667,LENGTHUNIT["US survey foot",0.304800609601]],
    PARAMETER["Northing at false origin",328083.3333,LENGTHUNIT["US survey foot",0.304800609601]]],
  CS[cartesian,2],
    AXIS["easting (X)",east,ORDER[1]],
    AXIS["northing (Y)",north,ORDER[2]],
    LENGTHUNIT["US survey foot",0.304800609601],
  ID["EPSG",6505]]
1
  • Unfortunately, the WKT is not (yet) the format that GDAL based softeware understands. But the devs are working on it.
    – AndreJ
    Commented Oct 23, 2018 at 6:19
3

Two sources other than SpatialReference.org to find this information:

1
1

If you have a modern version of PROJ since version 6.0, you can use projinfo from a local console, e.g.:

$ projinfo -o PROJ EPSG:6505
PROJ.4 string:
+proj=lcc +lat_0=43 +lon_0=-94 +lat_1=45.2166666666667 +lat_2=43.7833333333333 +x_0=800000.00001016 +y_0=99999.99998984 +ellps=GRS80 +units=us-ft +no_defs +type=crs

Another output format is PROJJSON if you'd prefer JSON.

An alternative Python interface via pyproj could also be used to extract the length units for each axis:

from pyproj import CRS

crs = CRS.from_epsg(6505)
print({ai.unit_name for ai in crs.axis_info})
# {'US survey foot'}

crs = CRS.from_epsg(4326)
print({ai.unit_name for ai in crs.axis_info})
# {'degree'}

# Be aware some CRSs have different units for each axis:
crs = CRS.from_epsg(4979)
print({idx: ai.unit_name for idx, ai in enumerate(crs.axis_info)})
# {0: 'degree', 1: 'degree', 2: 'metre'}

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.