[mapserver-users] Using Open street map tiles via GDAL_WMS

James Perrins james.perrins at gmail.com
Tue Dec 1 13:51:58 EST 2009


I've been trying to use Open street map tiles via a mapserver WMS
service displayed in OpenLayers.

This is sort of working - in that I'm getting maps displayed and they
seem to be in the right position (as checked against other datasets).

My issue is that the images are nowhere near as clear as the originals
from the Open Street map tiles.  I've kept projections the same
throughout - and they don't appear to be being re-projected.  The
images saved in the local cache (if enabled) are the same as from Open
Street Map.  What appears to be happening is that mapserver is getting
images from (perhaps) a zoom level too high - and then re-sampling
these to produce the WMS output image - which then appears to have too
much detail displayed for its zoom level (if you understand what I'm
trying to say).

Any ideas why this is happening - I've messed around with Bounding
boxes and image sizes - but it doesn't seem to make any difference.

Thanks
James


MapFile extract:

LAYER
	NAME "OSM"
	STATUS ON
	TYPE RASTER
	DATA "D:\Websites\OpenStreetMap\OSM.xml"
	PROJECTION
	  "init=EPSG:900913"
	END
END	


<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl>
    </Service>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        <UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-20037508.34</LowerRightY>
        <TileLevel>19</TileLevel>
	<TileCountX>1</TileCountX>
	<TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:900913</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>3</BandsCount>
</GDAL_WMS>


More information about the mapserver-users mailing list