16
votes
Accepted
Convert GPS coordinates to Web Mercator EPSG:3857 using python/pyproj
from pyproj import Proj, transform
print(transform(Proj(init='epsg:4326'), Proj(init='epsg:3857'), -0.1285907, 51.50809)) # longitude first, latitude second.
# output (meters east of 0, meters north ...
13
votes
Accepted
To project, or not to project? Extracting raster values with R
Reprojecting rasters is usually a bad thing to do. It involves a non-reversible transformation from one grid system to another grid system that can have a non-linear relationship to the first. Hence ...
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 should I handle CRS properly after the major change in PROJ library?
Please see: https://cran.r-project.org/web/packages/rgdal/vignettes/CRS_projections_transformations.html rather than the exploratory PROJ6_GDAL3 vignette, which described processes of seeing what ...
11
votes
Accepted
R-4.0.1 Not sure I understand this message: Warning message: In proj4string(x) : CRS object has comment, which is lost in output
This is not related to R 4.0.1 but to rgdal 1.5-8 and the migration to gdal 3 and proj 6. This is a very long and complex process that impact hundreds maybe thouthands of packages. All the packages ...
9
votes
Repairing broken GDAL and PROJ.4 on Ubuntu?
Try:
sudo apt-get install libproj-dev
It solved the same error for me when using gdal_translate for extracting bands from an hdf image.
9
votes
Adding Equal Earth Projection in QGIS?
This projection has been added to the 5.2.0. version of PROJ.4.
If you go in QGIS to Help>>About, you'll see that it uses an earlier version of PROJ.4
If you want this projection now, you'll have to ...
9
votes
Accepted
Are proj4 strings case sensitive?
Yes, it's case sensitive. Each +parameter=value pair are normally case sensitive.
For example with the parameter, there are two separate ellipsoid radius parameters R_A and R_a, which have different ...
9
votes
Accepted
GDAL Python - How I can determine the PROJ version used
This way:
>>> from osgeo import osr
>>> osr.GetPROJVersionMajor()
6
>>> osr.GetPROJVersionMinor()
2
9
votes
Accepted
How to update CRS r object from PROJ4 to PROJ6
Your proj4 string lacks a +datum parameter, and PROJ is warning you.
To remove the warning, add a +datum parameter with the correct datum that the data was defined as.
This is likely to be WGS84 or ...
8
votes
Accepted
How to get map units to find current scale in OpenLayers?
The units are within the projection of the view. From a map object, you can get it using:
var units = map.getView().getProjection().getUnits();
See also the API documentation of the ol.proj....
8
votes
Accepted
What is the history behind WKT and proj.4?
Wikipedia's proj.4 entry has some information. Gerald (Jerry) Evenden wrote the original proj software to convert coordinates with a command-line interface. It focused on map projections so you were ...
8
votes
Accepted
Convert WKT coordinate reference system to PROJ4
Use the rgdal package and showP4:
Your string:
> ps
[1] "COMPD_CS[\"Projected\", PROJCS[\"UTM_10N\", GEOGCS [ \"WGS84\", DATUM [ \"WGS84\", SPHEROID [\"WGS 84\", 6378137.000, 298.257223563 ], ...
8
votes
Accepted
Explaining pyproj to_epsg min_confidence parameter?
This is a great question and I will do my best to answer.
To begin, the init style syntax is deprecated (https://pyproj4.github.io/pyproj/stable/gotchas.html#init-auth-auth-code-should-be-replaced-...
7
votes
Accepted
What's this PROJ4 string in WKT?
Technically, I think you have two questions. The first is just what's the WKT for this PROJ.4 string. The second is about how a CRS WKT is structured. An answer to the second question is probably too ...
7
votes
Accepted
Which EPGS code is the actual CRS in this GeoPDF?
Your data seems to be in Haiti, using the North American Datum of 1927.
QGIS and GDAL use the datum grid shift files for NAD27 for USA and Canada, but unfortunately your data is just outside the ...
7
votes
Accepted
Adding Equal Earth Projection in QGIS?
In Twitter Tom Patterson posted this tweet and it works:
The latest #QGIS 3.4.0 supports #EqualEarthProjection in two steps:(1) In Settings -> Custom Projections… create a custom definition with “+...
7
votes
Build gdal with proj version 6
You are in the right track, but you need to inform gdal that you are using your own version of proj, rather than the one supplied with Ubuntu.
Up until gdal v2.4.1, you would do that by providing the ...
7
votes
Accepted
Transformation from CRS EPSG:3857 to ESRI:54009
Your output CRS is not defined by EPSG but by ESRI. EPSG:54009 does not exist. For ESRI:54009 use ImportFromESRI https://gdal.org/python/osgeo.osr.SpatialReference-class.html#ImportFromESRI.
EDIT
User ...
6
votes
Accepted
Gdal does not honor proj.4 scaling factor "+k_0"
The value for +k_0 should be around 1.0. See the table at Snyder, Map projections, page 110. You may find the source code for lcc at https://trac.osgeo.org/proj/browser/trunk/proj/src/PJ_lcc.c
If you ...
6
votes
PROJ.4 - General Parameters: +no_defs
In modern versions of the library, +no_defs means nothing.
Since v6.0.0, the default settings file has been removed.
That means that the +no_defs option is obsolete if you're using modern versions ...
6
votes
Accepted
Ortelius and Nicolosi projection in QGIS
You are out of luck with your attempt, because there is no inverse projection defined in PROJ.4 for the two projections you want.
QGIS depends on GDAL, and for any kind of reprojection the inverse ...
6
votes
QGIS incorrectly saving polygon with custom CRS, while correctly projecting it on-the-fly
These 'artifacts' are a well known problem, and are usually the result of polygons crossing the antimeridian (180 degrees e/w)
The go-to fix for this is usally ogr2ogr with the wrapdateline option.
...
6
votes
How do I convert WGS84 lat,long points from degrees to meters in Python?
You can use the library pyproj, that allows you to change the coordinate system. I use EPSG3035 that is convenient for Europe, but depending on where your points are you might have to use a different ...
6
votes
Finding correct extent of projection?
EPSG Geodetic Parameter Dataset
For EPSG-based projections, the official source is https://epsg.org, for example EPSG:3577:
A former website from the same organization, epsg-registry.org, is no ...
6
votes
Accepted
Modifying center of equirectangular world map in QGIS?
A helpful page for customizing projections in QGIS is this one, explaining the parameters of Proj.4 projections.
To get you started I would sugget the Michigan oblique Mercator projection; it should ...
6
votes
How to know if a projection is correct?
the easy way to check if the projection used is correct is to add reference data from another projection and visually check for consistency.
Based on the parameters of the projection, you can also ...
6
votes
Accepted
Different results from cs2cs and gdaltransform
See the difference:
gdaltransform -s_srs epsg:4326 -t_srs epsg:3857
Enter X Y [Z [T]] values separated by space, and press Return.
53.70015N 9.12875E
5977873.35352241 1020534.697294 0
9.12875 53....
6
votes
Accepted
Setting proj parameters of old map
The main problem is in the image warping parameters, they are not giving you the right gridded image.
About the projection itself, you are using the Lambert Conical projection in the right way. You ...
6
votes
Accepted
r - Setting custom projection in PROJ >=5 paradigm
You could template the WKT2 version i.e.
lon_0 <- 9
lat_0 <- 53
x_0 <- 4321000
y_0 <- 3210000
template <- "+proj=laea +lat_0={lat_0} +lon_0={lon_0} +x_0={x_0} +y_0={y_0} +datum=WGS84 +...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
proj × 601coordinate-system × 350
qgis × 93
gdal × 82
pyproj × 59
python × 58
r × 49
epsg × 36
postgis × 35
wgs84 × 25
well-known-text × 25
proj4js × 25
leaflet × 24
openlayers × 21
openlayers-2 × 19
gdalwarp × 19
raster × 17
coordinates × 17
utm × 16
geotiff-tiff × 14
sf × 13
shapefile × 12
javascript × 12
rgdal × 12
georeferencing × 11