[GRASS-dev] Projection name lookup table needed?

Hi,

I have generated a new location from the EU DEM 25m which comes with
these metadata:

gdalinfo eudem_dem_3035_europe.tif
Driver: GTiff/GeoTIFF
Files: eudem_dem_3035_europe.tif
       eudem_dem_3035_europe.tif.ovr
Size is 240000, 200000
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",
    GEOGCS["ETRS89",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6258"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4258"]],
    PROJECTION["Lambert_Azimuthal_Equal_Area"],
    PARAMETER["latitude_of_center",52],
    PARAMETER["longitude_of_center",10],
    PARAMETER["false_easting",4321000],
    PARAMETER["false_northing",3210000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3035"]]
Origin = (2000000.000000000000000,6000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
[...]

I have then imported the file, cut out a portion with r.mapcalc and
packed up the result with r.pack since I have to deliver the data to
another GRASS user.

For a test, I created a new location with

grass70 -c epsg:3035 ~/grassdata/eu_laea_extra

and tried to import it again. Surprisingly, different spelling created an issue:

r.unpack subregion_eudem_25m.pack
WARNING: Difference between PROJ_INFO file of packed map and of current
         location:
         - name: ETRS89 / LAEA Europe
         ? -------
         + name: ETRS89 / ETRS-LAEA
         ? +++++
         datum: etrs89
         ellps: grs80
         proj: laea
         lat_0: 52
         lon_0: 10
         x_0: 4321000
         y_0: 3210000
         - towgs84: 0,0,0,0,0,0,0
         no_defs: defined
ERROR: Projection of dataset does not appear to match current location. In
        case of no significant differences in the projection definitions,
        use the -o flag to ignore them and use current location definition.

Question:
in lib/proj/convert.c we have a function papszDatumEquiv(). Do we also
need a similar function for names?

thanks,
Markus

PS: If it matters, here the GDAL version (a Linux Mint box):
gdalinfo --version
GDAL 1.10.1, released 2013/08/26

Hi Markus, list

Maybe (un)related.

From a lat-long location, I’m trying to import TOPO-WMS from mundialis (je! I like the colors very much! :)) and so, I saved my region of interest (my_region) and run:

GRASS 7.1.svn (latlong_wgs84):~ > r.in.wms url=http://ows.mundialis.de/services/service? output=mundialis_topo layers=TOPO-WMS styles=default srs=4326 region=my_region format=png

Downloading data from WMS server…
Importing raster map into GRASS…
ERROR: Projection of dataset does not appear to match current location.

Location PROJ_INFO is:
name: Lat/Lon
proj: ll
datum: wgs84
ellps: wgs84
no_defs: defined
towgs84: 0.000,0.000,0.000

Import dataset PROJ_INFO is:
cellhd.proj = 0 (unreferenced/unknown)

In case of no significant differences in the projection definitions,
use the -o flag to ignore them and use current location definition.
Consider generating a new location from the input dataset using the
‘location’ parameter.
ERROR: r.in.gdal failed

but i get ERROR, even though EPSG:4326 is listed as available for the layer.

GRASS 7.1.svn (latlong_wgs84):~ > r.in.wms url=http://ows.mundialis.de/services/service? -c

TOPO-WMS

Topographic WMS - by mundialis

Also from the GUI I get the same error regarding projection (see screenshot). Maybe I’m doing it completely wrong, dunno… help is welcome :slight_smile:

Testing examples from the manual page, I get the same error:

r.in.wms output=kn url=http://wms.cuzk.cz/wms.asp layers=prehledka_kraju-linie srs=4326 format=png
Downloading data from WMS server…
Importing raster map into GRASS…
ERROR: Projection of dataset does not appear to match current location.

Location PROJ_INFO is:
name: Lat/Lon
proj: ll
datum: wgs84
ellps: wgs84
no_defs: defined
towgs84: 0.000,0.000,0.000

Import dataset PROJ_INFO is:
cellhd.proj = 0 (unreferenced/unknown)

In case of no significant differences in the projection definitions,
use the -o flag to ignore them and use current location definition.
Consider generating a new location from the input dataset using the
‘location’ parameter.
ERROR: r.in.gdal failed

My box is Fedora 23 and I’m using:

version=7.1.svn

revision=r68259

build_date=2016-04-14
build_platform=x86_64-pc-linux-gnu
proj4=4.9.1

gdal=2.0.2
geos=3.4.2
sqlite=3.11.0

Cheers,
Vero

(attachments)

error_importing_wms.png

···

2016-04-14 11:54 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

Hi,

I have generated a new location from the EU DEM 25m which comes with
these metadata:

gdalinfo eudem_dem_3035_europe.tif
Driver: GTiff/GeoTIFF
Files: eudem_dem_3035_europe.tif
eudem_dem_3035_europe.tif.ovr
Size is 240000, 200000
Coordinate System is:
PROJCS[“ETRS89 / LAEA Europe”,
GEOGCS[“ETRS89”,
DATUM[“European_Terrestrial_Reference_System_1989”,
SPHEROID[“GRS 1980”,6378137,298.2572221010002,
AUTHORITY[“EPSG”,“7019”]],
AUTHORITY[“EPSG”,“6258”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4258”]],
PROJECTION[“Lambert_Azimuthal_Equal_Area”],
PARAMETER[“latitude_of_center”,52],
PARAMETER[“longitude_of_center”,10],
PARAMETER[“false_easting”,4321000],
PARAMETER[“false_northing”,3210000],
UNIT[“metre”,1,
AUTHORITY[“EPSG”,“9001”]],
AUTHORITY[“EPSG”,“3035”]]
Origin = (2000000.000000000000000,6000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
[…]

I have then imported the file, cut out a portion with r.mapcalc and
packed up the result with r.pack since I have to deliver the data to
another GRASS user.

For a test, I created a new location with

grass70 -c epsg:3035 ~/grassdata/eu_laea_extra

and tried to import it again. Surprisingly, different spelling created an issue:

r.unpack subregion_eudem_25m.pack
WARNING: Difference between PROJ_INFO file of packed map and of current
location:

  • name: ETRS89 / LAEA Europe
    ? -------
  • name: ETRS89 / ETRS-LAEA
    ? +++++
    datum: etrs89
    ellps: grs80
    proj: laea
    lat_0: 52
    lon_0: 10
    x_0: 4321000
    y_0: 3210000
  • towgs84: 0,0,0,0,0,0,0
    no_defs: defined
    ERROR: Projection of dataset does not appear to match current location. In
    case of no significant differences in the projection definitions,
    use the -o flag to ignore them and use current location definition.

Question:
in lib/proj/convert.c we have a function papszDatumEquiv(). Do we also
need a similar function for names?

thanks,
Markus

PS: If it matters, here the GDAL version (a Linux Mint box):
gdalinfo --version
GDAL 1.10.1, released 2013/08/26


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

gdalinfo eudem_dem_3035_europe.tif
Driver: GTiff/GeoTIFF
Files: eudem_dem_3035_europe.tif
      eudem_dem_3035_europe.tif.ovr
Size is 240000, 200000
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",

[...]

r.unpack subregion_eudem_25m.pack
WARNING: Difference between PROJ_INFO file of packed map and of current
        location:
        - name: ETRS89 / LAEA Europe
        ? -------
        + name: ETRS89 / ETRS-LAEA

[...]

PS: If it matters, here the GDAL version (a Linux Mint box):
gdalinfo --version
GDAL 1.10.1, released 2013/08/26

tested here with:

GDAL 2.0.2, released 2016/01/26

testepsg EPSG:3035
-----------------------------------
WKT[EPSG:3035] =
PROJCS["ETRS89 / LAEA Europe",
    GEOGCS["ETRS89",
[...]
Simplified WKT[EPSG:3035] =
PROJCS["ETRS89 / LAEA Europe",
    GEOGCS["ETRS89",
[...]
Old Style WKT[EPSG:3035] = PROJCS["ETRS89 / LAEA Europe",GEOGCS["ETRS89
[...]
-----------------------------------

I've done gdalbuildvrt with EU DEM tiles, GDAL 2.0.2 recognizes the EU DEM
tiles as:

---------------
<VRTDataset rasterXSize="200000" rasterYSize="200000">
  <SRS>PROJCS["ETRS89 / LAEA
Europe",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989"
[....]
---------------
-----------------------------------

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Projection-name-lookup-table-needed-tp5261272p5261326.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Helmut Kudrnovsky wrote

gdalinfo eudem_dem_3035_europe.tif
Driver: GTiff/GeoTIFF
Files: eudem_dem_3035_europe.tif
      eudem_dem_3035_europe.tif.ovr
Size is 240000, 200000
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",

[...]

r.unpack subregion_eudem_25m.pack
WARNING: Difference between PROJ_INFO file of packed map and of current
        location:
        - name: ETRS89 / LAEA Europe
        ? -------
        + name: ETRS89 / ETRS-LAEA

[...]

PS: If it matters, here the GDAL version (a Linux Mint box):
gdalinfo --version
GDAL 1.10.1, released 2013/08/26

tested here with:

GDAL 2.0.2, released 2016/01/26

testepsg EPSG:3035
-----------------------------------
WKT[EPSG:3035] =
PROJCS["ETRS89 / LAEA Europe",
    GEOGCS["ETRS89",
[...]
Simplified WKT[EPSG:3035] =
PROJCS["ETRS89 / LAEA Europe",
    GEOGCS["ETRS89",
[...]
Old Style WKT[EPSG:3035] = PROJCS["ETRS89 / LAEA Europe",GEOGCS["ETRS89
[...]
-----------------------------------

I've done gdalbuildvrt with EU DEM tiles, GDAL 2.0.2 recognizes the EU DEM
tiles as:

---------------
<VRTDataset rasterXSize="200000" rasterYSize="200000">
  
<SRS>
PROJCS["ETRS89 / LAEA
Europe",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989"
[....]
---------------
-----------------------------------

and when I do a test raster export from a location created by EPSG:3035:

gdalinfo es_l1_1km_out.tif
Driver: GTiff/GeoTIFF
Files: es_l1_1km_out.tif
Size is 6813, 6067
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",

at least with my configuration here:

GRASS Version: 7.1.svn
GRASS SVN revision: r68249
Build date: 2016-04-12
Build platform: x86_64-pc-linux-gnu
GDAL: 2.0.2
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.8.7.1
Python: 2.7.9
wxPython: 3.0.1.1
Platform: Linux-3.16.0-4-amd64-x86_64-with-debian-8.4

it's always: ETRS89 / LAEA Europe

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Projection-name-lookup-table-needed-tp5261272p5261327.html
Sent from the Grass - Dev mailing list archive at Nabble.com.