Hi Dylan
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?
Thanks a lot,
Rainer
Dylan Beaudette wrote:
SNIP
> 7. once GDAL 1.5 is released it will be possible to an r.in.gdal and point it
> to an XML file defining a WMS resource. A mini-script might be able to
> construct the XML file on the fly...
>
> Unfortunately you will still have to manage the images that are imported into
> GRASS with GRASS commands, unless you constantly overwrite a temporary set of
> files by always using the same names and the --o flag.
>
SNIP
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
s.
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:
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
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
On 03/01/08 14:06, Rainer M Krug wrote:
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.
Well, if you have the data directly accessible, I don't know if it is the most efficient way to access it via a webserver and wms. The main insterest of this is obviously to get data from a distant wms server...
Moritz
On Wednesday 02 January 2008, Rainer M Krug wrote:
Hi Dylan
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?
Thanks a lot,
Rainer
Hi Rainer,
Yes, the new GDAL format (as also mentioned by others) is documented here:
http://www.gdal.org/frmt_wms.html
My suggestion, as quoted below, did not include replacing a _mapserver_ (WMS
source)- rather support for WMS would allow r.in.gdal to replace r.in.wms...
or perhaps re-write r.in.wms as a wrapper to r.in.gdal by first creating the
XML config file. See http://www.gdal.org/frmt_wms.html for details.
Cheers,
Dylan
Dylan Beaudette wrote:
SNIP
> 7. once GDAL 1.5 is released it will be possible to an r.in.gdal and
point it
> to an XML file defining a WMS resource. A mini-script might be able to
> construct the XML file on the fly...
>
> Unfortunately you will still have to manage the images that are
imported into
> GRASS with GRASS commands, unless you constantly overwrite a
temporary set of
> files by always using the same names and the --o flag.
SNIP
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
On Thursday 03 January 2008, Moritz Lennert wrote:
On 03/01/08 14:06, Rainer M Krug wrote:
> 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.
Well, if you have the data directly accessible, I don't know if it is
the most efficient way to access it via a webserver and wms. The main
insterest of this is obviously to get data from a distant wms server...
Moritz
Right. I think that within the context of the original discussion (?) the
point was access to a tiled, indexed image catalog of sorts. I had suggested
adding internal overviews to the pile of images (gdaladdo), creating a tile
index (gdaltindex), and then making the pile of images accessible via WMS
(mapserver) so that chunks of the entire virtual mosaic could be imported
into a GRASS region- either by r.in.wms (or r.in.gdal with some help).
If I get a chance to mess around with this, I will post back a worked out
example.
Cheers,
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341