[MapProxy] MapProxy serving gdal2tiles output

Angelos Tzotsos gcpp.kalxas at gmail.com
Wed Nov 28 15:07:47 PST 2012


On 11/28/2012 11:17 PM, Oliver Tonnhofer wrote:
> On 28.11.2012, at 21:31, Angelos Tzotsos wrote:
>> I have a simple tif image in EPSG:2100 that I want to serve through a TMS and WMS.
>> I have created tiles using gdal2tiles and I want to use MapProxy to provide the above services, without using another server.
>> Is this possible?
> Yes :)

Great :)
>
>> What I am doing is defining a cache without a source, giving the directory where the tile structure is located.
>> I followed the documentation and some information I got asking on IRC and this is my yaml file so far:
>> http://pastebin.com/wAkM4G2d
> This looks good. The tricky part will be to configure the right grid of your tiles. I don't know how gdal2tiles works for non-4326/3875 images. Does gdal2tiles give you some information (resolutions, bbox)?
> I would remove min_res and add all resolutions that are tiled.
This is the tilemapresource file:

<?xml version="1.0" encoding="utf-8"?>
     <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
       <Title>0462042000.tif</Title>
       <Abstract></Abstract>
       <SRS>EPSG:2100</SRS>
       <BoundingBox minx="4200000.00000000000000" 
miny="462000.00000000000000" maxx="4201500.00000000000000" 
maxy="464000.00000000000000"/>
       <Origin x="4200000.00000000000000" y="462000.00000000000000"/>
       <TileFormat width="256" height="256" mime-type="image/png" 
extension="png"/>
       <TileSets profile="raster">
         <TileSet href="0" units-per-pixel="8.00000000000000" order="0"/>
         <TileSet href="1" units-per-pixel="4.00000000000000" order="1"/>
         <TileSet href="2" units-per-pixel="2.00000000000000" order="2"/>
         <TileSet href="3" units-per-pixel="1.00000000000000" order="3"/>
         <TileSet href="4" units-per-pixel="0.50000000000000" order="4"/>
         <TileSet href="5" units-per-pixel="0.25000000000000" order="5"/>
       </TileSets>
     </TileMap>


I have modified the grid like this:

   grid_2100:
     tile_size: [256, 256]
     srs: 'EPSG:2100'
     bbox: [462000.0, 4200000.0, 464000.0, 4201500.0]
     bbox_srs: 'EPSG:2100'
     origin: 'ul'
     res: [8.0, 4.0, 2.0, 1.0, 0.5, 0.25]

Still I get a blanc tile when hitting:
http://127.0.0.1:8080/tms/1.0.0/olp_tms/EPSG2100/0/0/0.png


>
>> Unfortunately, I get a blank tile when I ask for 0/0/0.png from my web browser under TMS service.
>> I have seen that there is a seed_only option, but for wms sources, I do not know if this is possible for a cache.
>> Any hints?
>
> Ignore seed_only, an empty sources list for the cache is enough.
>
>
ok.

-- 
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
http://users.ntua.gr/tzotsos



More information about the MapProxy mailing list