Hot answers tagged

62 votes

Choosing SRID and what is its meaning?

An SRID is a coordinate system. We're taught in (traditional / Arc) "GIS" to always store your data in a projected coordinate system, because we're going to eventually use some calculation like 'area',...
user avatar
29 votes
Accepted

Is re-projection needed from SRID 4326 (WGS 84) to SRID 4269 (NAD 83)?

Well, technically, NAD83 is not a subset of WGS84. If you mine further in the SpatialReference.org projetion definitions, you can see the difference between the two projections. PROJ.4 definiton of ...
user avatar
  • 4,428
25 votes
Accepted

Adding additional geometry column in PostGIS?

To add a column to an existing table, use the ALTER TABLE DDL, e.g.: ALTER TABLE my_table ADD COLUMN the_geom_mercator geometry(Geometry,3857); which can be populated from another column (...
user avatar
  • 39.9k
17 votes
Accepted

Problem with Geometry SRID in PostGIS

What's happening is that the data you are trying to insert does not have an SRID assigned. To assign one, try wrapping the inserted geometry in your insert statement with ST_SetSRID(). E.g., INSERT ...
user avatar
15 votes
Accepted

Creating custom Coordinate System in PostGIS

It's easy here Look it up on http://www.spatialreference.org Find it SR-ORG:7069 NAD_1983_HARN_StatePlane_Michigan_South_FIPS_2113_IntlFeet Click PostGIS spatial_ref_sys INSERT statement Run that ...
user avatar
  • 6,701
13 votes
Accepted

What is the SRID for EPSG 102743?

There is no EPSG SRID 102743. Note that EPSG is the authority, and 102743 is the SRID. If you look up SRID 102743 on spatialreference.org, the listing is for ESRI:102743, meaning that ESRI (the ...
user avatar
13 votes
Accepted

Is SRID 4326 Lon/Lat or Lat/Lon?

In principle, it should always be lat/lon as that is what the current EPSG database defines it as. Unfortunately, over the years computer scientists have visited and made a decision to use lon/lat as ...
user avatar
  • 75.1k
12 votes
Accepted

Where do SRID numbers come from?

They're mostly from the EPSG - https://www.epsg-registry.org/ To be unique, you have to specify where they are from (basically a namespace - EPSG:4326, not just 4326). However most people will ...
user avatar
  • 12.5k
12 votes
Accepted

Calling ST_Transform in geometry that is already in target srid?

The function checks for same in and out srid, and returns untouched if so, as the source code shows: /* * If input SRID and output SRID are equal, return geometry * without transform it */ if ( ...
user avatar
10 votes
Accepted

SRID and Name relationship

If you want/need to have more info from within PostGIS, running something like SELECT srid, left(split_part(srtext, '"', 1), -1) AS "type", split_part(srtext, '"', 2) AS "name", ...
user avatar
  • 23.9k
8 votes

Ensuring SRID on geometry column in PostGIS

You don't need constraints for PostGIS 2.x, just us typmods. For 2D geometries with SRID=4326, the typmod is geometry(Geometry,4326). Or for M-dimension geometries, it would be geometry(GeometryM,4326)...
user avatar
  • 39.9k
8 votes
Accepted

Get different SRIDs of geometry column in a table

If column in your table has explicitly defined geometry type and srid, like: CREATE TABLE geom_table (id serial, geom geometry(point,3857); Your database will not allow to place there any other ...
user avatar
  • 2,567
8 votes

SRID and Name relationship

A good modern web resource is epsg.io It's "modern" because it has been synchronized to recent versions of the EPSG reference database, as stated at the bottom of the web page. It's source is ...
user avatar
  • 39.9k
8 votes
Accepted

What exacly ST_SetSRID in PostGIS does?

ST_SetSRID will set the coordinate reference system of your geometry. This will allow PostGIS commands to understand how your grid will relate to other geometries. Using ST_SetSRID is not essential, ...
user avatar
  • 713
8 votes
Accepted

Reprojecting in PostGIS not working as expected

UpdateGeometrySRID only ever sets the SRID identifier (and changes the typemod accoridngly), it does not reproject! This scenario is covered by the docs: If you got the projection wrong (or brought ...
user avatar
  • 23.9k
7 votes
Accepted

How can I get proj4text from srtext?

Just copy the string into a text file named crs.txt, and run gdalsrsinfo crs.txt >> out.txt in the OSGeo4W Shell or Linux Terminal on it: PROJ.4 : '+proj=longlat +ellps=intl +no_defs ' OGC WKT ...
user avatar
  • 75k
7 votes

Is it possible to reproject spatial data using SQL Server?

Example for reprojection from EPSG:2193 to EPSG:3857 c:\OSGeo4W64\bin\ogr2ogr.exe ^ -f "MSSQLSpatial"^ "MSSQL:server=DestServerName;database=DestDbName;trusted_connection=yes"^ "MSSQL:server=...
user avatar
7 votes
Accepted

What SRID is this?

There could be two possibilities. If the coordinates are in km and is the top of a ridgeline/mountain (approximately lat:46.853795 lon:7.985557), the CRS could be CH1903 / LV03, EPSG::21781. If the ...
user avatar
  • 18.2k
7 votes

What exacly ST_SetSRID in PostGIS does?

With ST_SetSRID it is possible to define explicitly what the coordinates like (-122.079513,45.607703) mean: for example that they are WGS84 long-lat degrees https://epsg.io/4326 and not something ...
user avatar
  • 52.4k
6 votes

Problem with Geometry SRID in PostGIS

If you are typing a geometry's WKT into pgAdmin III, you need to specify the SRID using EWKT syntax, otherwise it defaults to 0. Type this into the geometry field of pgAdmin III: SRID=26191;POINT(...
user avatar
  • 39.9k
6 votes

How I get SRID from Geometry field

After trying the above with no luck, I tried the method below: select [geomColumnName].STSrid from [schema].[tableName] This gives the SRID value for all records in the table. I would assume that ...
user avatar
6 votes
Accepted

Finding units for specific spatial reference system?

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....
user avatar
  • 48.6k
6 votes
Accepted

Distance from point stored in geometry with SRID 4326

You want to use ST_DWithin() which takes advantage of indexing SELECT * FROM adresse WHERE ST_DWithin(latlong::geography, ST_SetSRID(ST_Point(16.520, 47.846), 4326)::geography, 200) ORDER BY ...
user avatar
  • 3,520
6 votes
Accepted

Length of reversed geometry in meters

Yes, this is a rounding error, a slight difference in the result depending on order of operands. Not sure what ST_LengthSpheroid() differs, but it's possible there's a slightly different code path ...
user avatar
  • 19.4k
6 votes

What SRID is this?

I've found a couple of useful tools to find possible CRSes if you know the general area. epsg.io : this is a web site which is a search engine for CRSes. Type in something like 'Switzerland' and it'...
user avatar
  • 19.8k
6 votes
Accepted

Problems with SRID 32717

epsg:32717 is a UTM projection in meters, not degrees, which covers a thin strip from Ecuador down through Peru. You're telling it the point coordinates you have are in epsg:32717. But these seem to ...
user avatar
  • 19.8k
6 votes
Accepted

Getting geometry column integer SRID from a GeoPandas geodataframe?

In geopandas <= v0.6.3., gdf.crs returns a dictionary like {'init': 'epsg:EPSG_CODE'}. So, more appropriate way is to use tools of geopandas defined in geopandas.tools module. geom_srid_num = gpd....
user avatar
6 votes

How to overlay layers with different SRID using QGIS and PostGIS?

This is one of the most infamous issues in the GIS world: setting vs. transforming a CRS. Take your time and get familiar with coordinate references, projections and transformations - it will make ...
user avatar
  • 23.9k
5 votes
Accepted

Ensuring SRID on geometry column in PostGIS

@BradHards is right. Having mixed types is probably going to cause problems down the road. If you're sure your tools can handle mixed types, or you're going to be retrieving them some other way (...
user avatar
5 votes

Why does Find_SRID return zero?

Complementing with 3 "as it's": 1. As John's answer of 2014, SRID of 0 doesn't technically exist, it just means no SRID — ie, the default if you forget to set it. Zero is a valid SRID, ...
user avatar
  • 2,084

Only top scored, non community-wiki answers of a minimum length are eligible