locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
184 stars 73 forks source link

WebMercator EPSG code retrieved from proj4 parameters returns a legacy value #61

Closed pomadchin closed 3 years ago

pomadchin commented 4 years ago

The EPSG code of WebMercator projection created from the proj4 string returns a legacy value; EPSG:3785 instead of EPSG:3857; to reproduce the behavior use the following code:

crsFactory
  .readEpsgFromParameters("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs")