[gdal-dev] WMS Issues Two Requests

Martin Lewis MLewis at ngms.eu.com
Fri Feb 7 02:09:40 PST 2014


Thanks for the post.
A little background may help - sorry about that.
This is for a software program using C++ where the user can pan a map and a
request is made to the WMS to fetch that current map in view.
I hand rolled a prototype where I issued my own WMS request setting the
'bbox' parameters to the extents of the view the user was currently looking
at and width and height to size of the image that we wanted -all was great -
we just got a slice of map returned that we were interested in.

This prototype was then adapted to use GDAL, I have then picked this up to
'fix' it as it was deemed not fast enough.

Currently an XML file is created with the WMS parameters, it is then passed
to GDALOpen().
The resulting dataset is then read using ds->ReadRasterIO().

It seems that when it was originally converted to GDAL, the previous
engineer used the same 'bbox' parameters in the DataWindow extents. The
original 'width' and 'height' values are passed in the SizeX and SizeY tags
in the XML

>From what you are suggesting, this is totally wrong usage for these
parameters in the XML. 

What I am struggling to see now is how programmatically in C++ (rather than
gdal_translate), I can replicate the '-outsize' and '-prjwin' to get GDAL to
issue one WMS request where the 'bbox' is set to extents that I want e.g
-10.22, 57.74, 4.88, 51.35 and 'Width' and 'Height' in the WMS request are
set to 1076 and 787?









--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-WMS-Issues-Two-Requests-tp5102423p5102449.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list