[GRASS-dev] [GRASS GIS] #2229: error in projection definition

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------
Setting up a new location via location wizard results in an error when
it's done by specifying the epsg code 3857.

This (not recognized) geodetic system uses a spherical ellipsoid (+a=+b),
but the created location's projection parameters show a flattened
ellipsoid (+rf=298,...).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2229&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by neteler):

I cannot reproduce the problem with 6.4.svn r60122. Screenshot attached.
My system is:

{{{
System Info
GRASS version: 6.4.4svn
GRASS SVN Revision: 60122M
GDAL/OGR: 1.10.1
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.5
wxPython: 2.8.12.0
Platform: Linux-3.14.3-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug
}}}

I also tested on the same machine GRASS 7.1.svn:

{{{
grass71 -c epsg:3857 ~/grassdatum/test
Cleaning up temporary files...
Creating new GRASS GIS location/mapset...
...
Welcome to GRASS 7.1.svn (r60176M)
...

GRASS 7.1.svn (test):~ > g.proj -w
PROJCS["Mercator",
     GEOGCS["wgs84",
         DATUM["WGS_1984",
             SPHEROID["WGS_1984",6378137,298.257223563]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     PROJECTION["Mercator_2SP"],
     PARAMETER["standard_parallel_1",0],
     PARAMETER["central_meridian",0],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["Meter",1]]
}}}

All fine, perhaps your PROJ.4 version is outdated?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2229#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by hamish):

I suspect the fact that epsg 3857 is a new entry for the epsg file
(replaces 900973 from extra.esri) may have something to do with it. How
does it act for codes which do not exist?

Vincent, what version of proj4 and gdal are you using? what platform?
did you try to then specify the definition manually by +proj4 terms or by
manually choosing ellips to be sphere, etc?

Hamish

ps- please try to only use pseudo-mercator if data import/export demands
it, it is the cause of much pain. :slight_smile:

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2229#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by vincent):

Replying to [comment:2 hamish]:

> Vincent, what version of proj4 and gdal are you using? what platform?

Quite old ones :

proj4 :
Rel. 4.7.1, 23 September 2009

gdal :
GDAL 1.9.0, released 2011/12/29

uname --all :
Linux pc1 3.2.0-4-amd64 Debian 3.2.57-3 x86_64 GNU/Linux

> did you try to then specify the definition manually by +proj4 terms or
by manually choosing ellips to be sphere, etc?

Yes, passing the proj4 chain gives the right projection, see this
[http://lists.osgeo.org/pipermail/grass-user/2014-March/070030.html
thread] for history.

> ps- please try to only use pseudo-mercator if data import/export demands
it, it is the cause of much pain. :slight_smile:

I keep it in mind from then...

V.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2229#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by vincent):

Replying to [comment:1 neteler]:
> I cannot reproduce the problem with 6.4.svn r60122. Screenshot attached.

Markus, sorry I missed your reply 6 weeks ago. I don't really understand
your attachment : to me it seems you have the same issue i.e. a non-null
rf parameter.

V.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2229#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by hamish):

note what shows up on the loc'n wizard summary screen is *not* the terms
used to create the location! Check your $MAPSET/PERMANENT/PROJ_INFO file
(`g.proj -p`) to see what really made it in.

vincent:
> proj4 : Rel. 4.7.1, 23 September 2009

> gdal : GDAL 1.9.0, released 2011/12/29

Debian/wheezy then? same here. the epsg file which comes with the proj-
data package there does include epsg 3857, as does wkt/csv versions of the
epsg database in grass-core, libgdal1, and libgeotiff-epsg packages. So
all is new enough.

I'm not sure how grass's /usr/lib/grass64/etc/ogr_csv/pcs.csv handles the
@null part though, or if that is even used here, it may just be the
version picked up by the OGR library functions which matters.

are you using the standard grass package from debian wheezy? (ver 6.4.2-2)

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2229#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2229: error in projection definition
--------------------------------+-------------------------------------------
Reporter: vincent | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Projections/Datums | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------+-------------------------------------------

Comment(by vincent):

Replying to [comment:5 hamish]:

> Debian/wheezy then?

yes

> I'm not sure how grass's /usr/lib/grass64/etc/ogr_csv/pcs.csv handles
the @null part though, or if that is even used here, it may just be the
version picked up by the OGR library functions which matters.
>
> are you using the standard grass package from debian wheezy? (ver
6.4.2-2)

no, ver 6.4.4svn (last compiled about 2 weeks ago)

Vincent.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2229#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>