WMS getMap interface

7 messages Options
Embed this post
Permalink
Simone Gadenz-3

WMS getMap interface

Reply Threaded More More options
Print post
Permalink
Hello!

I am looking for a WMS server that can consume a TC cache and provide images of an arbitrary extent.

According to the documentation each tile can be called using a WMS syntax. For the short test I have done there is no possibility of calling images with an arbitrary extent through that interface.

I found GDAL has a minidriver for accessing WMS-C caches but again for the test it seems it works only for accessing a single tile. I might be wrong since i did not understand fully the configuration.

Going to the point, I would like to understand how hard would be to implement a WMS getmap interface into the TileCache, and in case what is the best strategy. I saw a WMS.py under the service folder. is thet the right point to start?

Thanks

S



_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Josh Livni

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
I am not aware of any WMS servers that let you query (via WMS) for an image of arbitrary extent, and use tiles (local or remote) as source data.

The only thing I've personally come across that seems like it might fill the bill is ws-compose (part of modest maps codebase).  With ws-compose.py running as a service, you can basically give it some arbitrary extent and image size and a service provider for the tiles, and it will get the appropriate tiles and stitch them together.  

You may want to take a look at the branch that is within http://github.com/mikelmaron/paperwalking for a version that has some ability to pass in service provider info via the url request (tho not using wms syntax).  This version also lets you stack different providers' tiles on top of eachother (kinda like cascading wms). 

 -Josh


On Tue, Sep 15, 2009 at 7:39 AM, Simone Gadenz <[hidden email]> wrote:
Hello!

I am looking for a WMS server that can consume a TC cache and provide images of an arbitrary extent.

According to the documentation each tile can be called using a WMS syntax. For the short test I have done there is no possibility of calling images with an arbitrary extent through that interface.

I found GDAL has a minidriver for accessing WMS-C caches but again for the test it seems it works only for accessing a single tile. I might be wrong since i did not understand fully the configuration.

Going to the point, I would like to understand how hard would be to implement a WMS getmap interface into the TileCache, and in case what is the best strategy. I saw a WMS.py under the service folder. is thet the right point to start?

Thanks

S



_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache



_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Christopher Schmidt-2

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
On Tue, Sep 15, 2009 at 08:06:28AM -0700, Josh Livni wrote:
> I am not aware of any WMS servers that let you query (via WMS) for an image
> of arbitrary extent, and use tiles (local or remote) as source data.

MapServer with GDAL and the WMS driver will let you do this.

> The only thing I've personally come across that seems like it might fill the
> bill is ws-compose (part of modest maps codebase).  With ws-compose.py
> running as a service, you can basically give it some arbitrary extent and
> image size and a service provider for the tiles, and it will get the
> appropriate tiles and stitch them together.
>
> You may want to take a look at the branch that is within
> http://github.com/mikelmaron/paperwalking for a version that has some
> ability to pass in service provider info via the url request (tho not using
> wms syntax).  This version also lets you stack different providers' tiles on
> top of eachother (kinda like cascading wms).
>
>  -Josh
>
>
> On Tue, Sep 15, 2009 at 7:39 AM, Simone Gadenz <[hidden email]> wrote:
>
> > Hello!
> >
> > I am looking for a WMS server that can consume a TC cache and provide
> > images of an arbitrary extent.
> >
> > According to the documentation each tile can be called using a WMS syntax.
> > For the short test I have done there is no possibility of calling images
> > with an arbitrary extent through that interface.
> >
> > I found GDAL has a minidriver for accessing WMS-C caches but again for the
> > test it seems it works only for accessing a single tile. I might be wrong
> > since i did not understand fully the configuration.
> >
> > Going to the point, I would like to understand how hard would be to
> > implement a WMS getmap interface into the TileCache, and in case what is the
> > best strategy. I saw a WMS.py under the service folder. is thet the right
> > point to start?
> >
> > Thanks
> >
> > S
> >
> >
> >
> > _______________________________________________
> > Tilecache mailing list
> > [hidden email]
> > http://openlayers.org/mailman/listinfo/tilecache
> >
> >

> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache


--
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Christopher Schmidt-2

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
In reply to this post by Simone Gadenz-3
On Tue, Sep 15, 2009 at 04:39:00PM +0200, Simone Gadenz wrote:

> Hello!
>
> I am looking for a WMS server that can consume a TC cache and provide images
> of an arbitrary extent.
>
> According to the documentation each tile can be called using a WMS syntax.
> For the short test I have done there is no possibility of calling images
> with an arbitrary extent through that interface.
>
> I found GDAL has a minidriver for accessing WMS-C caches but again for the
> test it seems it works only for accessing a single tile. I might be wrong
> since i did not understand fully the configuration.

This should work. Did you try one of the example configurations?

  http://gdal.org/frmt_wms_metacarta_wmsc.xml

As a RASTER type datasource in MapServer should let you request any WMS
extent and have it fill the data using the TileCache backend. (Oh,
but that WMS service is down, so that doesn't really let you demonstrate;
but still, if you have an EPSG:4326 map, that file shoudl be easy to adapt).
I'll try and get that server back up later today or tomorrow morning.

> Going to the point, I would like to understand how hard would be to
> implement a WMS getmap interface into the TileCache, and in case what is the
> best strategy. I saw a WMS.py under the service folder. is thet the right
> point to start?

Possibly, but I am not in favor of adding image mosaicing to TileCache;
I think you would be best to try to get GDAL+MapServer working rather
than changing the way TileCache works in this way.

(There are, I believe, at least 3 different files called WMS.py.)

Changing this would require changing a significant amoutn of core
infrastructure of TileCache to accomodate for this use case.

REgards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Simone Gadenz-3

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
Thanks Christopher. I tried to set up the service with the configuration you suggested but i should have set the wrong parameters as it returns back only one tile stretched accordingly to the dimension or errors.  But I am using a projected reference system and it is also strange that, having a square geographic extent, I cannot have only one single tile at the level 0 of the cache but a 2 by 2 tiles structure. Can be this the main problem? I tryes to set up the following parameters

<TileCountX>2</TileCountX>
<TileCountY>2</TileCountY>

but I have back errors.

Is there any place i can read a description of the parameters?

Cheers

Simone

2009/9/15 Christopher Schmidt <[hidden email]>
On Tue, Sep 15, 2009 at 04:39:00PM +0200, Simone Gadenz wrote:
> Hello!
>
> I am looking for a WMS server that can consume a TC cache and provide images
> of an arbitrary extent.
>
> According to the documentation each tile can be called using a WMS syntax.
> For the short test I have done there is no possibility of calling images
> with an arbitrary extent through that interface.
>
> I found GDAL has a minidriver for accessing WMS-C caches but again for the
> test it seems it works only for accessing a single tile. I might be wrong
> since i did not understand fully the configuration.

This should work. Did you try one of the example configurations?

 http://gdal.org/frmt_wms_metacarta_wmsc.xml

As a RASTER type datasource in MapServer should let you request any WMS
extent and have it fill the data using the TileCache backend. (Oh,
but that WMS service is down, so that doesn't really let you demonstrate;
but still, if you have an EPSG:4326 map, that file shoudl be easy to adapt).
I'll try and get that server back up later today or tomorrow morning.

> Going to the point, I would like to understand how hard would be to
> implement a WMS getmap interface into the TileCache, and in case what is the
> best strategy. I saw a WMS.py under the service folder. is thet the right
> point to start?

Possibly, but I am not in favor of adding image mosaicing to TileCache;
I think you would be best to try to get GDAL+MapServer working rather
than changing the way TileCache works in this way.

(There are, I believe, at least 3 different files called WMS.py.)

Changing this would require changing a significant amoutn of core
infrastructure of TileCache to accomodate for this use case.

REgards,
--
Christopher Schmidt
MetaCarta


_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Simone Gadenz-3

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
In reply to this post by Simone Gadenz-3
Peter,

thnks for the information.

Can you provide more info on how you calculated the calue of the sizex and sizey tag?

I am having a sample dataset covering this geoextent:

1689098,4776277,1697478,4781885

Tilecache creates 2 by 2 tiles at level 0 so i supposed the right configuration could be:

for the MAP file:

   layer
     name  "TEST"
     type raster
     status on
     data "/var/www/tilecache/test/wms_test.xml"
     extent 1689098 4776277 1697478 4781885

     METADATA
        "wms_title" 'TESTWMSC'
    "wms_srs" "EPSG:4267"
    "wms_extent" "1689098 4776277 1697478 4781885"
       END
     projection
    "init=epsg:4267"
     end
    offsite 0 0 0
    PROCESSING "CLOSE_CONNECTION=DEFER"
   END

For the xml of the driver:


<GDAL_WMS>
<Service name="WMS">
<Version>1</Version>
<ServerUrl>http://localhost/tilecache/tilecache.cgi/1.0.0</ServerUrl>
<Layers>TESTWMS</Layers>
<ImageFormat>image/png</ImageFormat>
<SRS>EPSG:4326</SRS>
</Service>
<DataWindow>
<UpperLeftX>1689098</UpperLeftX>
<UpperLeftY>4781885</UpperLeftY>
<LowerRightX>1697478</LowerRightX>
<LowerRightY>4784657</LowerRightY>
<SizeX>524288</SizeX>
<SizeY>524288</SizeY>
<TileCountX>2</TileCountX>
<TileCountY>2</TileCountY>
</DataWindow>
<Projection>EPSG:4326</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>3</BandsCount>
<ClampRequests>false</ClampRequests>
</GDAL_WMS>

I think that is wrong but i have not found any documentation so far. Any help would be really appreciated. Thanks

S


2009/9/15 Soenke J. Peters <peters+tilecache.openlayers.org@opcenter.de>
Hi,

I solved this by using Mapserver serving the cached tiles from GDAL layers:

From mapserver wms.map:
...
   LAYER
       NAME  "Stadtkarte_HH"
       TYPE raster
       STATUS ON
       DATA "/var/www/mapserver/gdal-mrhh-stadtkarte.xml"
       EXTENT 3426656.0 5829871.0 3674464.0 6077679.0
       PROJECTION "init=epsg:31467"
"nadgrids=/usr/share/proj/BETA2007.gsb" END
       OFFSITE 0 0 0
       METADATA
           "wms_title"     "Stadtkarte HH"
           "wms_extent"    "3426656.0 5829871.0 3674464.0 6077679.0"
       END
       PROCESSING "CLOSE_CONNECTION=DEFER"
   END
...

gdal-mrhh-stadtkarte.xml:
<GDAL_WMS>
   <Service name="WMS">
       <Version>1</Version>
       <ServerUrl>http://mapserver/tilecache/?TRANSPARENT=false</ServerUrl>
       <Layers>Stadtkarte_HH</Layers>
       <Dataset>Stadtkarte_HH</Dataset>
       <ImageFormat>image/png</ImageFormat>
       <SRS>EPSG:31467</SRS>
   </Service>
   <DataWindow>
       <UpperLeftX>3426656.0</UpperLeftX>
       <UpperLeftY>6077679.0</UpperLeftY>
       <LowerRightX>3674464.0</LowerRightX>
       <LowerRightY>5829871.0</LowerRightY>
       <SizeX>524288</SizeX>
       <SizeY>524288</SizeY>
       <TileCountX>1</TileCountX>
   </DataWindow>
   <Projection>EPSG:31467</Projection>
   <!-- <OverviewCount>0</OverviewCount> -->
   <BlockSizeX>256</BlockSizeX>
   <BlockSizeY>256</BlockSizeY>
   <BandsCount>3</BandsCount>
   <ClampRequests>false</ClampRequests>
</GDAL_WMS>

I'm using the same technique for accessing Openstreetmap tiles via my WMS.




--
 ____   Soenke Jan Peters
 |_  _|    22395 Hamburg, Germany
 ._||      E-Mail & Jabber/XMPP: [hidden email]
          WWW: http://opcenter.de, GnuPG Key-ID: 0xF358FDC


_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Soenke J. Peters

Re: WMS getMap interface

Reply Threaded More More options
Print post
Permalink
Hi,

(I accidentally replied directly to Simone, not to the list)

Simone Gadenz schrieb:
> Can you provide more info on how you calculated the calue of the sizex
> and sizey tag?

these values denote the image sizes at highest resolution.

SizeX = TileCountX * BlockSizeX * 2^TileLevel
(with 256px wide tiles and 11 as your highest zoom level: 1 * 256 * 2^11
= 524288).

It is documented in http://www.gdal.org/frmt_wms.html

Bye,
--
  ____   Soenke Jan Peters
 |_  _|    22395 Hamburg, Germany
 ._||      E-Mail & Jabber/XMPP: [hidden email]
           WWW: http://opcenter.de, GnuPG Key-ID: 0xF358FDCA
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache