32
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 ...
28
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 (...
16
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 ...
14
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 ...
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 ...
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 ...
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 ( ...
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",
...
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 ...
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 ...
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, ...
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 ...
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=...
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 ...
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 ...
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 ...
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 ...
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'...
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 ...
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....
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 ...
5
votes
How to insert a GeoJSON polygon into a PostGIS table?
INSERT INTO tablename (name, polygon)
VALUES
(
'Name',
ST_GeomFromGeoJSON
(
'{
"type":"Polygon",
"coordinates":[
[7.734375,51.835777520452],
...
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, ...
5
votes
Accepted
change SRID of shapefile and QGIS
Rightclick, Save As ... to a new file and different CRS will do what you want.
You can not just change the SRID, but you have to recompute all coordinates as well. That is only done by Save As ..., ...
5
votes
Accepted
Transform to SRID 900913
If you run, using your original geometry:
SELECT
ST_AsText(
ST_GeomFromEWKT('...
5
votes
Accepted
What is the SRID for this .prj file?
NAD 1983 StatePlane South Carolina FIPS 3900 Feet
102733
http://spatialreference.org/ref/esri/102733/
5
votes
Accepted
Updating the Entry in geometry_columns for Spatial Table Created from a Query
With PostGIS 2.x, geometry_columns is a VIEW, not a TABLE.
Try altering my_table.geom to your specifications using:
ALTER TABLE my_table
ALTER COLUMN geom TYPE geometry(LineString, 4326) USING ...
5
votes
Converting 32639 spatial reference to 3857 in PostGIS
What you're doing with your first statement select st_transform(geom,3857) from block_1 is selecting all the rows, transformed to a new CRS.
If you do this, you'll note that it is in your expected ...
5
votes
SRID and Name relationship
I use http://spatialreference.org and http://www.epsg-registry.org.
spatialreference.org has the spatial reference information in numerous formats:
And EPSG has an access database you download:
5
votes
Using WGS 84 (SRID 4326) or Web Mercator (SRID 3857)
Having different representation systems was indispensable when only paper maps were produced.
Now, with digital maps, that need was divided into two:
One is to define geometric properties on objects ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
srid × 214postgis × 128
coordinate-system × 85
postgresql × 38
qgis × 18
geometry × 17
epsg × 12
sql-server × 10
shapefile × 8
postgis-2.0 × 8
ogr2ogr × 6
spatialite × 6
geodjango × 6
arcgis-desktop × 5
python × 5
enterprise-geodatabase × 5
latitude-longitude × 5
utm × 5
oracle-dbms × 5
sql-server-spatial × 5
geometry-data-type × 5
geoserver × 4
leaflet × 4
sql × 4
carto × 4