gvSIG bugs #2738
EPSG:3857 Proj4 representation is not correct
| Status: | Closed | % Done: | 0% | |
|---|---|---|---|---|
| Priority: | Normal | Spent time: | - | |
| Assignee: | ||||
| Category: | CRS | |||
| Target version: | - | |||
| Severity: | Major | Add-on version: | ||
| gvSIG version: | 2.1.0 | Add-on build: | ||
| gvSIG build: | 2239 | Add-on resolve version: | ||
| Operative System: | Add-on resolve build: | |||
| Keywords: | 3857, web_mercator, proj4 | Proyecto: | ||
| Has patch: | Yes | Hito: | ||
| Add-on name: |
Description
After #1371, #2306 and gvsig-jcrs:r246, the EPSG:3857 Proj4 representation is now the following:
+proj=merc +lon_0=0.0 +lat_ts=0.0 +x_0=0.0 +y_0=0.0 +a=6378137.0 +b=6378137.0 +ellps=WGS84
while it should be something like this (skipping +nadgrids, +wktext and +no_defs, not used by the org.gvsig.crs.Proj4 class):
+proj=merc +lon_0=0.0 +lat_ts=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +a=6378137 +b=6378137 +units=m
Instead, this is how the USR:3857 CRS Proj.4 string is defined:
+proj=merc +lon_0=0.0 +k=1 +x_0=0 +y_0=0 +R=6378137.0
In detail, the missing scale factor (+k=1.0) is not a problem, while +ellps=WGS84 should override the semiaxis definition.
Related issues
History
#1
Updated by Álvaro Anguix almost 12 years ago
- Related to gvSIG bugs #2739: Conversion between EPSG:3857 and EPSG:4326 doesn't match added
#2
Updated by Álvaro Anguix almost 12 years ago
- Assignee set to Joaquín del Cerro Murciano
#3
Updated by Antonio Falciano over 11 years ago
Being Web Mercator (EPSG:3857) a single projection, I think that we could simply hardcode its Proj4 definition. For instance, in the Proj4.class:
public String exportToProj4(CoordinateReferenceSystem crs) throws CrsException
{
// a lot of stuff here...
if (projectionAcronym[0].equals("merc"))
{
// other stuff here...
if (projectionName.equalsIgnoreCase("Popular_Visualisation_Pseudo_Mercator"))
isWmerc = true;
}
// other stuff here...
if (isWmerc)
strProj4 = "+proj=merc +lon_0=0.0 +lat_ts=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +R=6378137.0 +units=m ";
}
#4
Updated by Antonio Falciano over 11 years ago
- File Proj4.patch
added
I attach a patch that fixes this issue ...and also #2664 and #2596 (only partially).
The right Proj4 string of EPSG:3857 doesn't solve the other related issues (e.g. #2739) without the upgrade of libjni-proj4 (crsjniproj), because the conversion between EPSG:3857 and EPSG:4326 is actually not managed at all.
#5
Updated by Joaquín del Cerro Murciano over 11 years ago
- Target version set to 2.1.0-2259-rc3
- Assignee changed from Joaquín del Cerro Murciano to Francisco Díaz Carsí
#6
Updated by Francisco Díaz Carsí over 11 years ago
- Target version deleted (
2.1.0-2259-rc3) - Assignee changed from Francisco Díaz Carsí to Joaquín del Cerro Murciano
- Status changed from New to Fixed
Se ha aplicado el parche suministrado, y los cambios serán efectivos en el siguiente build de jcrs (2064)
#7
Updated by Antonio Falciano over 11 years ago
Francisco, thank you very much for gvsig-jcrs:r263. It's only a little piece of the whole puzzle. ;)
#8
Updated by Álvaro Anguix over 11 years ago
- Has patch set to Yes
#9
Updated by Antonio Falciano over 11 years ago
- Status changed from Fixed to Closed