Opened 8 years ago

Closed 7 years ago

#3127 closed defect (invalid)

r.in.wms fails

Reported by: hellik Owned by: grass-dev@…
Priority: critical Milestone: 7.4.0
Component: Raster Version: svn-trunk
Keywords: WMTS, raster, r.in.wms Cc:
CPU: x86-64 Platform: Linux

Description

taken from user ML user ML

r.in.wms --verbose
url=https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml output=test
layers=bmapgrau srs=3857 driver=WMTS_GRASS
Downloading data from WMS server...
WARNING: no switch
Fetching 56 tiles with 256 x 256 pixel size per tile...
Traceback (most recent call last):
  File "/home/bugs/dev/cpp/grass7_trunk/dist.x86_64-pc-
linux-gnu/scripts/r.in.wms", line 236, in <module>
    sys.exit(main())
  File "/home/bugs/dev/cpp/grass7_trunk/dist.x86_64-pc-
linux-gnu/scripts/r.in.wms", line 222, in main
    fetched_map = wms.GetMap(options, flags)
  File "/home/bugs/dev/cpp/grass7_trunk/dist.x86_64-pc-
linux-gnu/etc/r.in.wms/wms_base.py", line 210, in GetMap
    self.temp_map = self._download()
  File "/home/bugs/dev/cpp/grass7_trunk/dist.x86_64-pc-
linux-gnu/etc/r.in.wms/wms_drv.py", line 205, in _download
    tile_dataset.GetRasterBand(1).DataType)
AttributeError: 'NoneType' object has no attribute
'DataType'
r.in.wms --verbose
url=https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml output=test
layers=bmapgrau srs=3857 driver=WMS_GDAL
Downloading data from WMS server...
ERROR 1: GDALWMS: The server returned unknown exception.
ERROR 1: /home/bugs/grassdata/loc_epsg3857/rastadata/.tmp/na
da/3422.1, band 1: IReadBlock failed at X offset 0, Y offset
0
ERROR 1: GetBlockRef failed at X block offset 0, Y block
offset 0
ERROR: Incorrect WMS query
System Info                                                                     
GRASS version: 7.3.svn                                                          
GRASS SVN revision: r69110                                                      
Build date: 2016-08-09                                                          
Build platform: x86_64-pc-linux-gnu                                             
GDAL: 2.1.1                                                                     
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.5
g.region -p                                                                     
projection: 99 (WGS 84 / Pseudo-Mercator)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      5961400
south:      5930120
west:       1401500
east:       1407550
nsres:      10
ewres:      10
rows:       3128
cols:       605
cells:      1892440

Attachments (1)

debug_rinwms.txt (26.6 KB ) - added by hellik 8 years ago.
r.in.wms debug messages

Download all attachments as: .zip

Change History (9)

by hellik, 8 years ago

Attachment: debug_rinwms.txt added

r.in.wms debug messages

in reply to:  description comment:1 by hellik, 8 years ago

Replying to hellik:

debug=3 messages of r.in.wms attached

comment:2 by mlennert, 8 years ago

I can see in your message a call to:

https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=geolandbasemap&STYLE=normal&FORMAT=image/png&TILEMATRIXSET=google3857&TILEMATRIX=12&TILECOL=2188&TILEROW=1435

This gives me the capabilities of the service, but not the tiles. In that capabilities file, I see that to get the tile 2188,1435, I have to use the following url:

http://maps1.wien.gv.at/basemap/bmapgrau/normal/google3857/12/1435/2188.png

So it seems (but I'm really a complete newbie in WMTS) that maybe the wrong URL is being called to get the tile...

in reply to:  2 comment:3 by hellik, 8 years ago

Replying to mlennert:

I can see in your message a call to:

https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=geolandbasemap&STYLE=normal&FORMAT=image/png&TILEMATRIXSET=google3857&TILEMATRIX=12&TILECOL=2188&TILEROW=1435

This gives me the capabilities of the service, but not the tiles. In that capabilities file, I see that to get the tile 2188,1435, I have to use the following url:

http://maps1.wien.gv.at/basemap/bmapgrau/normal/google3857/12/1435/2188.png

So it seems (but I'm really a complete newbie in WMTS) that maybe the wrong URL is being called to get the tile...

yes it seems so; see http://osgeo-org.1560.x6.nabble.com/file/n5280116/basemap_rinwms_flag_c.xml

[...]
<ResourceURL format="image/png" template="http://maps1.wien.gv.at/basemap/geolandbasemap/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png" resourceType="tile"/>
[...]

in reply to:  description ; comment:4 by hellik, 8 years ago

Replying to hellik:

r.in.wms --verbose
url=https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml output=test
layers=bmapgrau srs=3857 driver=WMS_GDAL
Downloading data from WMS server...
ERROR 1: GDALWMS: The server returned unknown exception.
ERROR 1: /home/bugs/grassdata/loc_epsg3857/rastadata/.tmp/na
da/3422.1, band 1: IReadBlock failed at X offset 0, Y offset
0
ERROR 1: GetBlockRef failed at X block offset 0, Y block
offset 0
ERROR: Incorrect WMS query

regarding driver=WMS_GDAL, some tests showed that this is not the correct r.in.wms GDAL driver (i.e. http://www.gdal.org/frmt_wms.html) for this server, it should be used GDAL WMTS (http://www.gdal.org/frmt_wmts.html). GDAL WMTS is available since GDAL 2.1.

that's not implemented yet, maybe worth for an enhancement ticket.

comment:5 by martinl, 8 years ago

Keywords: r.in.wms added
Milestone: 7.3.07.2.0

comment:6 by martinl, 8 years ago

Milestone: 7.2.07.3.0

Revert milestone to 7.3.0.

comment:7 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

in reply to:  4 comment:8 by hellik, 7 years ago

Resolution: invalid
Status: newclosed

Replying to hellik:

that's not implemented yet, maybe worth for an enhancement ticket.

see #3129 for the enhancement ticket. I'm inclined to close this one.

Note: See TracTickets for help on using tickets.