As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [srid]

A Spatial Reference System Identifier (SRID) is a unique value used to unambiguously identify projected, unprojected, and local spatial coordinate system definitions

Filter by
Sorted by
Tagged with
70 votes
1 answer
60k views

Choosing SRID and what is its meaning? [closed]

I'm new to GIS, in PostGIS, and I'm struggling with the SRID concept. How do you choose a SRID for a database column? This is making me crazy. Why do I need to choose a SRID? What's its meaning? ...
bluish's user avatar
  • 881
44 votes
4 answers
51k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON( '{ ...
danijar's user avatar
  • 1,154
41 votes
6 answers
24k views

Shapefile PRJ to PostGIS SRID lookup table?

I was wondering if there is such a thing as an shapefile PRJ to PostGIS SRID lookup table? Something that can translate the most standard shapefile PRJ definitions into the likely SRID. When using ...
RyanKDalton's user avatar
  • 22.9k
25 votes
4 answers
28k views

Is it possible to reproject spatial data using SQL Server?

SQL Server takes an SRID when creating spatial data, but is it possible to retrieve with a different SRID translating the coordinates? For example, let's say I have a bunch of spatial polygons using ...
Rowland Shaw's user avatar
24 votes
2 answers
51k views

PostGIS Geometry Query returns "Error: Operation on mixed SRID geometries" only for certain values

I have PostGIS table with two geometry columns, both defined with SRID 4326. I can insert into the table without problem, using the following INSERT statement (where lng and lat are values passed in ...
jessykate's user avatar
  • 341
22 votes
1 answer
6k views

Using customized Coordinate System in ArcGIS Desktop?

I don't know so much about coordinate systems... In my office we use to deal with spatial data coming from archaeological sites. Each site has its own x-y-z coordinate system (GCS). Three simple ...
Maik's user avatar
  • 461
17 votes
3 answers
55k views

How I get SRID from Geometry field

What is the function for getting SRID from Geometry field. I have inserted a shapefile into SQL Server table with a Geometry field defined. I know the projection of shapefile is Swreff99_1800 (EPSG:...
user1899's user avatar
  • 1,417
15 votes
1 answer
8k views

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

I have US census data against state boundaries stored as SRID 4269, in an MSSQL DB. The input data used for calculations against that dataset is stored as SRID 4326. As far as I can infer from the ...
Alexander Abakumov's user avatar
15 votes
3 answers
33k views

Adding additional geometry column in PostGIS?

I'm importing many sets of geodata into PostGIS, and they have different SRID's. (Some have EPSG:3857, some EPSG:4326, some something else). I'd like to create an additional geometry column, eg. ...
knutole's user avatar
  • 785
13 votes
3 answers
28k views

Problem with Geometry SRID in PostGIS

I ceated my table (borne) in PostGIS id_borne serial NOT NULL, num_borne character varying, shape_borne geometry I successfully changed the SRID of my table using select UpdateGeometrySRID('...
Yahia El Haddad's user avatar
12 votes
5 answers
6k views

Looking for a pythonic way to calculate the length of a WKT linestring

I was quite unsatisfied with Calculating Length of Linestrings in WGS84 in Miles. It kept me wondering if there is a more convenient, Pythonic way to calculate the length of a WKT linestring according ...
Adam Matan's user avatar
  • 6,770
12 votes
2 answers
8k views

What is the SRID of census.gov shapefiles?

I downloaded the county files from: http://www.census.gov/cgi-bin/geo/shapefiles2011/main I cannot figure out what SRID to use with them. When I am trying to generate a class file from ./manage.py ...
kzh's user avatar
  • 277
11 votes
4 answers
5k views

Understanding concept of Spatial Reference System?

I am trying to understand the concept behind the Spatial Reference System. Why is it used and what is so specific about the SRID number? I went through many definitions and almost all went over my ...
azzaxp's user avatar
  • 839
11 votes
1 answer
263 views

Calling ST_Transform in geometry that is already in target srid?

I'm writing a function that has a geometry as a parameter that can be in different projections: CREATE OR REPLACE FUNCTION foo(in geometry) RETURNS boolean AS $$ DECLARE transformed_geom geometry ...
Francisco Puga's user avatar
10 votes
2 answers
4k views

Creating custom Coordinate System in PostGIS

I have a Wayne county Michigan parcel dataset with a custom SRID: when I bring it into ArcGIS Projected Coordinate System: NAD_1983_HARN_StatePlane_Michigan_South_FIPS_2113_Feet_Intl Projection: ...
ziggy's user avatar
  • 4,380
10 votes
1 answer
2k views

Using shp2pgsql instead of ogr2ogr to import shapefile to PostGIS? [closed]

I may very well be doing something wrong here, but: If I import some shapefile to a PostGIS database using shp2pgsql, I have to first figure out the SRID/EPSG of that shapefile. I think this is, at ...
jac's user avatar
  • 341
9 votes
3 answers
2k views

SRID and Name relationship

PostGIS comes with a table of spatial reference systems with each one being identitfied by a SRID. However, from a user's perspective, SRID is just a number and doesn't tell them much. Is there a ...
user57029's user avatar
  • 137
9 votes
2 answers
8k views

ogr2ogr srs options: where is the well known definition determined?

In the ogr2ogr documentation it says that when using -a_srs srs_def: Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT ...
BenjaminGolder's user avatar
9 votes
1 answer
4k views

add new SRID to sql server

Is it possible to add a new SRID to sql server 2012? I've tried insert into sys.spatial_reference_systems values (4938, 'GEOCCS["GDA94",DATUM["Geocentric Datum of Australia 1994",SPHEROID["GRS 1980"...
Daniel Powell's user avatar
8 votes
3 answers
12k views

Is SRID 4326 Lon/Lat or Lat/Lon?

I built a wep app storing GPS coordinates, as SRID 4326. Coordinates are stored as Lon/Lat, and that was working fine on MySQL 5.6 and MySQL 5.7. Since I upgraded to MySQL 8, I get the following error ...
BenMorel's user avatar
  • 173
8 votes
1 answer
18k views

How to get the coordinate system from a PostGIS database?

My question is probably amazinlgy stupid, but I can't find the answer myself. I would like to extract from a database the latitude and longitude of points. For now, I'm getting x(the_geom) and y(...
Antonin's user avatar
  • 825
8 votes
2 answers
1k views

Storing SRID:4326 data as Geometry or Geography?

I used OGR2OGR to import SRID 4326 point data into MSSQL Server. Didn't realize that it defaults to creating a geometry column instead of detecting the data as 4326 and creating a geography column. ...
user28525's user avatar
7 votes
2 answers
3k views

What is the SRID for EPSG 102743?

I am trying to create a table in PostGIS for some LiDAR data and I need to set the the_geom column to my data's SRID. My data is in EPSG 102743, but when I try to use 102743 as my SRID as the_geom I ...
cbunn's user avatar
  • 1,387
7 votes
2 answers
4k views

Why does Find_SRID return zero?

using SELECT Find_SRID('public', 'myTable', 'myColumn'); I get zero as the result, what does it mean?
Kourosh's user avatar
  • 1,259
7 votes
1 answer
3k views

How do I get a country border data set into my geography column?

I have a PostGis database with a multipolygon geography (as opposed to geometry) column. I'd like to fill it with the country border data available from http://thematicmapping.org/downloads/...
BuschnicK's user avatar
  • 173
7 votes
1 answer
439 views

Why is there an upper limit to the SRID value in the spatial_ref_sys table in PostGIS 2.1?

I was trying to insert a reference system in PostGIS from http://spatialreference.org/, and got a constraint violation for spatial_ref_sys_srid_check. I checked that constraint and found that, when ...
Laurent Bourgault-Roy's user avatar
7 votes
1 answer
2k views

How do I change an existing srs in QGis?

I am showing postgis data with srid 28992 (Amersfoort / RD New). But when I plot the geospatial data on a map (with openlayers plugin), the data is shown a hunderd meters off because the datum shift ...
mrg's user avatar
  • 1,565
7 votes
2 answers
1k views

Creating Ellipse in WGS84, but with metric parameters

I have the function --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse) SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2) I have points in ...
Alexander Palamarchuk's user avatar
6 votes
1 answer
2k views

Where do SRID numbers come from?

We know what SRID 4326 means and what 3857 means but I do not know what these numbers mean. What is the minimum and maximum number for these SRIDs? I know it is a standard but how did they select ...
Majid Hojati's user avatar
6 votes
2 answers
276 views

Postgis 2.1 Inconsistent with spatialreference.org

The County of Napa, California, uses a projection "NAD_1983_StatePlane_California_II_FIPS_0402_Feet"; for example their roads.prj file has: PROJCS["NAD_1983_StatePlane_California_II_FIPS_0402_Feet",...
John Poole's user avatar
6 votes
1 answer
2k views

PostGIS spatial reference ID (SRID) for regular cartesian coordinate system?

I would like to store a polygon as a set of 2D points represented as x, y coordinates of a Cartesian coordinate system. Which spatial reference can I use? Looking at my spatial_ref_sys table, all the ...
Zoltán's user avatar
  • 161
6 votes
1 answer
3k views

Add a custom SRID to Spatialite

I'd like to create a spatialite database and load it with shapefiles using the Mississippi Transverse Mercator (MSTM) projection, but it doesn't have an EPSG definition in the spatialite library of ...
user12711's user avatar
  • 1,600
6 votes
1 answer
94 views

Is an SRID unique?

I wonder why the Authority and the SRID are often both used together to refer to a CRS, like in EPSG:4326. Isn't the SRID unique? Wikipedia says it is a "unique value", but also that spatial ...
bibermann's user avatar
6 votes
1 answer
234 views

Is there a way to determine the datum used when all you have is a lon and lat?

I have a dataset of US intersections from 2011 that I'm going to be using in a project together with data based in WGS84. Included in the CSV file is a variety of fields two of which are the lat and ...
Robb Vandaveer's user avatar
5 votes
3 answers
601 views

What SRID is this?

I have been sent the following coordinates, they belong to Switzerland: 641.621 189.131 I need to convert those to EPGS:4326, but I don't know what the source SRID is. Does someone recognise the ...
jjmontes's user avatar
  • 337
5 votes
1 answer
8k views

PostGIS - Geometry or Geography find points within distance in meters

I have a requirement where I need to store lat/long coordinates for locations all around the world. I then need to query for those locations that are within a specified distance (in meters) from ...
Sotirios Delimanolis's user avatar
5 votes
1 answer
243 views

Reprojecting in PostGIS not working as expected

I just reprojected with PostGIS tree layers using this function: select UpdateGeometrySRID('schema', 'table', 'geom', 3857) These tree layers are contiguous. The problem is, when I open it on QGIS to ...
J.Patordi's user avatar
  • 313
5 votes
2 answers
588 views

What is the SRID for this .prj file?

PROJCS["3900_SC_Nad_83",GEOGCS ["GCS_North_American_1983",DATUM ["D_North_American_1983",SPHEROID ["GRS_1980",6378137,298.257222101]], PRIMEM["Greenwich",0.0],UNIT["...
Matt's user avatar
  • 1,141
5 votes
1 answer
1k views

How can I get proj4text from srtext?

I have a custom projection used in some shapes on a prj file. I want to insert this projection in the table spatial_ref_sys PostGIS. The data in the prj file will SRTEXT table field, how can I get ...
csf's user avatar
  • 979
5 votes
3 answers
1k views

which map projection should I use to calculate distance in Poland

I'm using/learning geodjango + postgis, and I'm trying to calculate distance between 2 cities in Poland. First using WGS84/4326 I define 2 points, and then after transforming this points into ...
agend's user avatar
  • 153
5 votes
1 answer
13k views

Transforming geometry coordinates from SRID 4326 to SRID 3011 [duplicate]

In SQLServer geometry field, I want to change the coordinates of geometry from one spatial reference system to another spatial reference system (from SRID 4326 to SRID 3011) by using ST_Transform. But ...
user1899's user avatar
  • 1,417
5 votes
1 answer
1k views

Getting geometry column integer SRID from a GeoPandas geodataframe?

The primary answer to Adding GeoPandas Dataframe to PostGIS table? requires entering the geodataframe geometry column's integer SRID. Getting the CRS attribute using the crs attribute like so import ...
rovyko's user avatar
  • 279
5 votes
3 answers
1k views

Different values while calculating distance

I'm developing a project using LeafleatJS and PostGIS. Currently I'm getting trouble while calculating distance between two coordinates. For example: Point 1 - lat: -12.99835864475412, lng: -38....
M. Barreto's user avatar
5 votes
3 answers
5k views

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this: ╔════╦═══════╦═════════════╦══════════════╦══════════╦═════════════════╗ ║ id ║ index ║ easting ║ northing ║ utm_zone ║ ...
faskunji's user avatar
5 votes
1 answer
4k views

Is it possible to get coordinate system name from SQL Server geometry type?

I need to get the name of the coordinate system of a geometry type field in SQL Server 2008 R2 (for example NAD_1983_UTM_Zone_14N or GCS_WGS_1984 or other). Is this possible?
Dr. Greenthumb's user avatar
5 votes
2 answers
3k views

ST_Distance is not delivering right results

I want to calculate the distance between lat/lon points. I tried the following queries: Select ST_DISTANCE(ST_GeomFromText('POINT(-73.97923 40.75571)', 4326), ST_GeomFromText('POINT(-73.974509 40....
rintim4711's user avatar
5 votes
1 answer
10k views

How to fix incorrect SRID of the geometry column? [duplicate]

I've been told to use AddGeometryColumn to properly add a column with correct/preferred SRID. however I wonder if it's possible to fix/change the current column instead of adding a new? If there's no ...
Kourosh's user avatar
  • 1,259
5 votes
0 answers
135 views

create custom SRID from OGCWKT

I wanted to create a new SRID for use in PostGIS. My goal is to have a SRS that can cover an entire state (instead of have multiple zones as in SPCS). For example, I wanted to create a new SRS for ...
tinlyx's user avatar
  • 10.9k
4 votes
2 answers
3k views

What exacly ST_SetSRID in PostGIS does?

I am new to DBA and PostGIS. I am developing an application using PostgreSQL and PostGIS where nearby locations need to be queried. I created a sample table as below: CREATE TABLE foo (geog ...
TheGuardener's user avatar
4 votes
2 answers
6k views

Ensuring SRID on geometry column in PostGIS

I am using a table that has a geometry type column called "wkt". Its definition in the table looks like this: create table sometable ( ... wkt geometry not null, ... ); I want to change it ...
whyceewhite's user avatar

1
2 3 4 5