2

I want to use the st_within function to find geometries within a specifi distance. My geometries are both in the same SRID stored in a postgis db. From what I read here: http://postgis.net/docs/ST_DWithin.html "The distance is specified in units defined by the spatial reference system of the geometries."

Where can I find the units of this specific reference system I use (EPSG:2100)?

6

Usually, the unit is given for each CRS inside its documentation, so you can find it directly in the CRS information, for example :

UNIT["metre",1,AUTHORITY["EPSG","9001"]

UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]]

if you don't find the information on your system (, you can check on spatialreference.org

Be aware that sometimes both the unit of the datum (usually degree) and the projection are mentioned, in this case you need to select the unit of the projection.

> PROJCS["GGRS87 / Greek Grid",    <-- this is the name of your coordinate system
>     GEOGCS["GGRS87",    <-- here starts the desription of the datum 
>         DATUM["Greek_Geodetic_Reference_System_1987",
>             SPHEROID["GRS 1980",6378137,298.257222101,
>                 AUTHORITY["EPSG","7019"]],
>             TOWGS84[-199.87,74.79,246.62,0,0,0,0],
>             AUTHORITY["EPSG","6121"]],
>         PRIMEM["Greenwich",0,
>             AUTHORITY["EPSG","8901"]],
>         UNIT["degree",0.01745329251994328,
>             AUTHORITY["EPSG","9122"]],
>         AUTHORITY["EPSG","4121"]],
>     <-- Here starts the description of the projection, below you find the unit that will be used for calculation
>     UNIT["metre",1, AUTHORITY["EPSG","9001"]], 
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",24],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     AUTHORITY["EPSG","2100"],
>     AXIS["Easting",EAST],
>     AXIS["Northing",NORTH]]

in the proj4text, you'll find the unit of the CRS only

+units=m

when no unit is mentioned, the default is degree.

  • Thanks for the answer and the link. What I don't undestand is that there are two different units. So is it afterall in meters or in degrees? What these two units represent? – user1919 Jan 19 '15 at 12:11
  • 2
    if you look at the indentation, degree is the unit used for the geographic coordinate system "behind" the projection, while meter is at the same level as the projection. – radouxju Jan 19 '15 at 12:27
5

You can look up your CRS under http://spatialreference.org/ref/epsg/2100/

Following the first link, you will find:

UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],

You will get the same information when you look up the code definition in the spatial_ref_sys table of your postgis database. There it looks like

+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs 
4

EPSG.io offers a more modern interface to explore EPSG codes and their properties.

http://epsg.io/2100

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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