29
votes
Accepted
Extracting EPSG from a raster using gdal bindings in Python
I found the following workaround. I am unsure if it is the most efficient, but it does work for me.
from osgeo import gdal, osr
path = r"C:\temp\test2.tif"
d = gdal.Open(path)
proj = osr....
23
votes
How can EPSG:3857 be in meters?
It is a projection of a spheroid on a flat surface. Every projection has strengths and weaknesses and will preserve some elements of direction, distance or area better or worse than others (which is ...
15
votes
Accepted
Why accurate area of all countries cannot be obtained using a single EPSG code, even if it corresponds to an equal-area projection?
What went wrong: EPSG:3395 is not equal area
The CRS you use, EPSG:3395, is definitely not an equal area projection. It is a World Mercator projection that heavily distorts areas, see here, including ...
13
votes
Accepted
Convert GPS coordinates into 3-dimensional cartesian coordinates (x,y,z)
To do 3D transformations, you need 3D CRS:
EPSG:4326 (2D) -> EPSG:4979 (3D)
<Geographic 3D CRS: EPSG:4979>
Name: WGS 84
Axis Info [ellipsoidal]:
- Lat[north]: Geodetic latitude (degree)
- ...
12
votes
Accepted
PROJ.4 How to create custom CRS to displace by x and y?
The EPSG:32719 is a UTM Zone 19 south setup with:
$ grep -B1 '<32719>' /usr/share/proj/epsg
# WGS 84 / UTM zone 19S
<32719> +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs <...
12
votes
Accepted
How do coordinate reference systems and projections relate to each other?
Does qgis just pick a default projection or does that mean that in epsg 4326 there's a 2d projection defined as well?
QGIS doesn't project the geographic coordinates to the map canvas. If the map ...
12
votes
Accepted
Convert UTM zone into EPSG code
Use pyproj (version 2.2+):
from pyproj import CRS
# use PROJ string, assuming a default WGS84
crs = CRS.from_string('+proj=utm +zone=36 +south')
# or dictionary
crs = CRS.from_dict({'proj': 'utm', '...
11
votes
Extracting EPSG from a raster using gdal bindings in Python
You can also do this in one line using gdal.Info as so:
epsg = int(gdal.Info(input, format='json')['coordinateSystem']['wkt'].rsplit('"EPSG","', 1)[-1].split('"')[0])
This does essentially the same ...
11
votes
Accepted
GeoPandas Warnings unless wrong EPSG is used
You get that warning because EPSG:4326 (WGS84) is geographic CRS and its unit is degree. The key message here is "Geometry is in a geographic CRS". You don't get a warning when using EPSG:...
10
votes
leaflet map crs is 3857 but coordinates 4326
This is a feature, not a bug. Most Leaflet users are not aware that the map's display CRS is different from the map's data CRS, and that's fine; it makes life simpler for most people.
If your ...
10
votes
Accepted
Google Earth Engine Reprojection to non-EPSG defined CRS
Yes, Earth Engine can reproject images to non-EPSG coordinate reference systems.
Earth Engine uses the Java GeoTools library for coordinate system transformations which supports the Coordinate System ...
10
votes
Accepted
Finding out whether an EPSG code is geographic or projected in Python
You can use PyCRS library.
import pycrs
crs3857 = pycrs.parse.from_epsg_code(3857)
print("EPSG:3857 is " + crs3857.cs_type)
crs4326 = pycrs.parse.from_epsg_code(4326)
print("EPSG:4326 ...
10
votes
Accepted
What are the units in CRS EPSG:4326?
Decimal degrees. Not so much the CRS as the way computers handle floats. They use decimal numbers, not sexagesimal values. Pretty much every CRS uses decimal numbers, whether they are spheroidal or ...
10
votes
Why accurate area of all countries cannot be obtained using a single EPSG code, even if it corresponds to an equal-area projection?
In addition to the fact that EPSG:3395 is not an equal area projection (therefore inaccurate for area measures), as mentioned by @Babel, a precise measure of the area requires a good projection. ...
10
votes
Accepted
Choosing CRS for area of interest of my project
Go to https://epsg.org/ and define your region of interest, e.g. using box and drawing a rectangular polygon:
You get a (long) list of CRS valid in the defined region.
Decide what kind of projection ...
9
votes
Converting EPSG:2284 to EPSG:4326 with pyproj
Simply use (Converting elevations into correct units with pyproj?, Proj4 String for NAD83(2011) / Louisiana South (ftUS), ...)
preserve_units=True (as you say, pyproj assumes that your coordinates ...
9
votes
Listing all EPSG projections to serve it on the client side
GDAL is using Proj and Proj since version 6 keeps the definitions or coordinate reference systems in a small SQLite database that is named "proj.db". Therefore the most natural place for ...
9
votes
Accepted
Combining two shapefiles with different map projections in QGIS
Use the 'reproject layer' tool on the layer you want to change. Or, if you just need to reassign the projection without reprojecting the data, then use the 'assign projection' tool.
If your data is ...
8
votes
Why do 2 EPSG Codes exist for the same coordinate system?
EPSG:31463 seems to be deprecated and EPSG:31467 is the correct one.
http://spatialreference.org/ref/epsg/dhdn-3-degree-gauss-zone-3/ is stating:
ProjCRS related to inappropriate coordinate ...
8
votes
Difference between UTM Zone 15N and UTM Zone 15T
Short answer: No, UTM Zone 15 N is not the same as UTM Zone 15 T.
Long answer:
UTM Zone 15 N means the area bounded by:
east-west boundaries are the longitudes 90° W to 96° W
north-south boundaries ...
8
votes
Coordinate system for Finland in ArcGIS Desktop?
As you found, EUREF-FIN is a realization of ETRS89 in Finland.
Some countries, when displaying coordinates or transmitting data, use the convention northing, easting order while other countries use ...
8
votes
What are the units in CRS EPSG:4326?
Create a point-layer in EPSG:4326 (I use QGIS), add a few features and label them with $x to get the value of the x-coordinate: as you can see, decimal values are used. If you go to layer properties, ...
8
votes
Order of latitude and longitude in EPSG:4326
Note EPSG.io despite its name is not the official registry of EPSG. The official EPSG Geodetic Parameter Dataset is https://epsg.org/home.html.
The CRS EPSG:4326 is (and always has been) defined as ...
7
votes
Reprojecting EPSG:3412 to EPSG:4326 using GDAL?
According to spatilreference.org, your proj4 string is not correct. -a_srs defines the projection but does not modify the coordinates, so your output vrt file is likely to be incorrect (based on a ...
6
votes
Accepted
Converting EPSG to D3.js
I'll try, but I've never used D3. I do know projections and the state plane system very well. Let's look at a full definition of EPSG::26729.
PROJCS["NAD27 / Alabama East",
GEOGCS["NAD27",
...
6
votes
Difference between WGS84 and EPSG:4326
No they are not equivalent.
WGS is EPSG:7030. As Dan S. has said WGS84 is an ellipsoid (spheroid to be more precise). EPSG:4326 is a geographic coordinate system that makes use of the WGS84 ellipsoid. ...
6
votes
Accepted
Why ogr doesn't read this kind of prj
The WKT string in that .prj is corrupt. I don't know what wrote it, but the PROJCS and UNITS elements are repeated.
i.e. (indicated by --> <--)
-->PROJCS["<--PROJCS["WGS 84 / UTM zone 24N",...
6
votes
Accepted
How many CRS / EPSG codes are there?
As of EPSG Geodetic Parameter Dataset v9.3 (it's now up to 9.4.1 online), there are 5822 coordinate reference systems. This includes projected, geographic/geodetic, vertical, and a few engineering ...
6
votes
Accepted
Coordinate system for Finland in ArcGIS Desktop?
I can't answer why they would flip N/E but if I had got data (e.g. OSM) in WGS84 and wanted to projected it in ArcMap into EUREF_FIN_TM35FIN (WKID: 3067) then I would have set the transformation as ...
6
votes
Accepted
Listing all EPSG projections to serve it on the client side
The PostGIS Spatial Reference Systems table can be found here:
https://github.com/postgis/postgis/blob/master/spatial_ref_sys.sql?raw=true
Source on GitHub: https://github.com/postgis/postgis/blob/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
epsg × 491coordinate-system × 318
qgis × 87
gdal × 44
python × 41
wgs84 × 38
proj × 36
postgis × 27
shapefile × 20
leaflet × 20
geoserver × 18
coordinates × 18
pyproj × 18
geotools × 16
openlayers-2 × 15
well-known-text × 15
r × 14
utm × 14
arcgis-desktop × 13
openlayers × 12
ogr × 12
ogr2ogr × 12
srid × 12
wms × 11
convert × 11