[GRASS-user] gdal 1.5 and WMS ressource --- PREVIOUSLY:How to
best access hundreds of orthophotos -- mapserver as WMS server?
Rainer M Krug
Rainer.grass at krugs.de
Thu Jan 3 08:06:15 EST 2008
Moritz Lennert wrote:
> On 02/01/08 21:37, sebastian sauer wrote:
>> Wed 02 Jan 2008 18:27, Rainer M Krug wrote:
>>> you wrote in the a previous thread that one can use gdal 1.5 directly
>>> to access a WMS ressource which is defined in an xml file (see
>>> snippet below).
>>> As 1.5 is out (and I compiled with MrSid support - works nicely by
>>> the way), I looked but could find no information on that feature.
>>> Could you please elaborate how I can use this instead of setting up a
>>> mapserver on localhost?
>> my understanding was - feel free to correct me - dylan was refering to
>> the OGR/GDAL vrt driver.
>>
>> http://www.gdal.org/gdal_vrttut.html
>> http://www.gdal.org/ogr/drv_vrt.html
>
> I would rather guess it was the "WMS -- Web Map Services" driver:
>
Ah - now I understand. I still have to set up a WMS server, but I can
access it through gdal instead of using r.in.wms.
Thanks again,
Rainer
> http://www.gdal.org/frmt_wms.html
>
> The page explains that you have to create an xml file such as this:
>
> <GDAL_WMS>
> <Service name="WMS">
> <Version>1.1.1</Version>
> <ServerUrl>http://onearth.jpl.nasa.gov/wms.cgi?</ServerUrl>
> <SRS>EPSG:4326</SRS>
> <ImageFormat>image/jpeg</ImageFormat>
> <Layers>modis,global_mosaic</Layers>
> <Styles></Styles>
> </Service>
> <DataWindow>
> <UpperLeftX>-180.0</UpperLeftX>
> <UpperLeftY>90.0</UpperLeftY>
> <LowerRightX>180.0</LowerRightX>
> <LowerRightY>-90.0</LowerRightY>
> <SizeX>2666666</SizeX>
> <SizeY>1333333</SizeY>
> </DataWindow>
> <Projection>EPSG:4326</Projection>
> <BandsCount>3</BandsCount>
> </GDAL_WMS>
>
>
> I guess (but have never tried) that this would lead to an r.in.gdal line
> such as:
>
> r.in.gdal in=YourFile.xml out=GRASSLayerName
>
> Moritz
More information about the grass-user
mailing list