Skip to main content
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....
Lennert De Feyter's user avatar
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 ...
MappaGnosis's user avatar
  • 33.9k
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 ...
Babel's user avatar
  • 73.1k
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) - ...
snowman2's user avatar
  • 7,459
12 votes
Accepted

What's the meaning of numbers before an EPSG code, e.g. the 6.9 in EPSG:6.9:4326?

Note: this is part of an answer already given here, but it seems fitting to post it again. The 6.9 means that the SRS 4326 specified in version 6.9 of the EPSG database, which you can find here.
karpfen's user avatar
  • 2,307
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 <...
huckfinn's user avatar
  • 3,603
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 ...
Gabriel De Luca's user avatar
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', '...
Mike T's user avatar
  • 42.2k
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 ...
onakua's user avatar
  • 690
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:...
Kadir Şahbaz's user avatar
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 ...
IvanSanchez's user avatar
  • 10.3k
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 ...
Kadir Şahbaz's user avatar
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 ...
wingnut's user avatar
  • 2,110
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. ...
radouxju's user avatar
  • 49.8k
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 ...
Babel's user avatar
  • 73.1k
9 votes
Accepted

Reproject shapefile in QGIS using "save as" return weird result

You did nothing wrong. It's just the fact that a Mercator projection can not display the south pole. The dataset you have contains a whole line at the bottom on 90°S, which can mathematically not be ...
AndreJ's user avatar
  • 76.7k
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 ...
gene's user avatar
  • 55.1k
9 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 ...
Tyler Erickson's user avatar
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 ...
user30184's user avatar
  • 67.3k
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 ...
jbalk's user avatar
  • 7,583
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 ...
Revo's user avatar
  • 637
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 ...
csk's user avatar
  • 24.9k
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 ...
mkennedy's user avatar
  • 19k
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, ...
Babel's user avatar
  • 73.1k
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 ...
nmtoken's user avatar
  • 13.5k
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 ...
radouxju's user avatar
  • 49.8k
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. ...
Paul Childs's user avatar
6 votes

Difference between WGS84 and EPSG:4326

They are certainly not the same. WGS is a datum(for lat/loong specifations) while EPSG is a database of CRS and related information. Those who think these are same actually ignore the basic purpose of ...
A Salim Khan's user avatar
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", ...
mkennedy's user avatar
  • 19k
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",...
user2856's user avatar
  • 67.1k

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