[mapserver-users] mapserver as a tiling client for an untiled WMS

Smith, Michael ERDC-CRREL-NH michael.smith at usace.army.mil
Sun Apr 18 03:15:12 PDT 2010


Marco,

To use the GDAL WMS Minidriver, create an XML file like below and then
reference that xml file in your MapServer layer. For more info about the
format of the WMS xml, see here http://www.gdal.org/frmt_wms.html

Example xml
-----------

<GDAL_WMS>
  <Service name="WMS">
      <Version>1.1.1</Version>
 <ServerUrl>http://hazards.fema.gov/wmsconnector/wmsconnector/com.esri.wms.E
srimap/NFHL?transparent=true&</ServerUrl>
        <SRS>EPSG:4326</SRS>
        <Layers>Flood_Hazard_Zones_General</Layers>
        <Styles>default</Styles>
        <ImageFormat>image/gif</ImageFormat>
    </Service>
    <DataWindow>
        <UpperLeftX>-180.0</UpperLeftX>
        <UpperLeftY>90.0</UpperLeftY>
        <LowerRightX>180.0</LowerRightX>
        <LowerRightY>-90.0</LowerRightY>
        <TileLevel>19</TileLevel>
        <TileCountX>2</TileCountX>
        <TileCountY>1</TileCountY>
    </DataWindow>
    <Projection>EPSG:4326</Projection>
    <BlockSizeX>1024</BlockSizeX>
    <BlockSizeY>1024</BlockSizeY>
    <BandsCount>3</BandsCount>
     <Cache>    
        <Path>/htdocs/orm/gdalwmscache</Path>
        <Depth>2</Depth>
        <Extension>.gif</Extension>
     </Cache>
  <AdviseRead>true</AdviseRead>
  <VerifyAdviseRead>true</VerifyAdviseRead>
</GDAL_WMS>

----------------

Mapfile section
---------------

LAYER
  NAME femaq3
  DATA "/data/fema/fema_gen_wms.xml"
  OFFSITE 255 255 255
  TYPE raster
  STATUS off
  PROJECTION
    "proj=latlong"
    "ellps=GRS80"
  END
  CLASS
      NAME "100 year floodplain"
      SYMBOL 0
    COLOR 255 0 0
  END
  CLASS
      NAME "500 year floodplain"
      SYMBOL 0
    COLOR 255 192 203
  END
END


-- 
Michael Smith
RSGIS Center
US Army Corps of Engineers



On 4/17/10 6:29 AM, "DeDuikertjes" <DeDuikertjes at xs4all.nl> wrote:

> Dear List,
> 
> In my mapserver maps (served as a WMS) I'd like to add a layer from an
> untiled WMS (not under my control).
> Simple enough, but this WMS restricts the returned images to a maximum
> number of pixels, and also restricts the scale (only scales larger than
> a certain scale is allowed). The maps I'd like to make of course exceeds
> the limit of pixels.
> 
> The solution seems simple enough: chop up the request in a series off
> requests, and stich the returned images together. So basically this is a
> tiling approach. To complicate things a bit, the service is not
> spherical mercator.
> 
> I guess I have to use the GDAL-WMS minidriver and/ or TileCache, but
> I've not a clue to how to proceed. Can anyone please point me to some
> usefull examples or give me a short explanation to work from?
> 
> any help again greatly appreciated ...
> 
> MArco
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list