[mapserver-users] Does wms_extent of a layer impact performance

Newcomb, Doug doug_newcomb at fws.gov
Fri Jan 24 05:19:09 PST 2014


James,

>From the docs:

*wms_extent*

   -

   *WMS TAG Name:* BoundingBox (WMS1.1.1, sect. 6.5.6)
    -

   *Description:* (Optional) Used for the layer’s BoundingBox tag for cases
   where it is impossible (or very inefficient) for MapServer to probe the
   data source to figure its extents. The value for this metadata is “minx
   miny maxx maxy” separated by spaces, with the values in the layer’s
   projection units. If wms_extent is provided then it has priority and
   MapServer will NOT try to read the source file’s extents.

   For Rasters served through WMS, MapServer can now use the wms_extent
   metadata parameter to register the image. If a .wld file cannot be found,
   MapServer will then look for the wms_extent metadata parameter and use the
   extents of the image and the size of the image for georegistration.


So basically the wms_extent is supposed to be in the layer projections
coordinate system range.  With UTM zones, the x-coordinate for the center
of each zone is 500,000m and approximately 180km east and west of the
meridian ( varies with latitude) , see
http://geokov.com/education/utm.aspx.  You should never have a
negative number in a UTM zone x coordinate and
your minimum x would be around 166,000m and maximum x coordinate is
834,000m ( at the equator).

Not sure where you got your coordinates for all UTM Zones for the
Continental US, but I would guess that they are from some continental
projection like US Albers Meters CONUS.  If you have shapefile indexes of
the rasters with projection information, you should not need wms_extent in
your mapfile.

Doug










On Fri, Jan 24, 2014 at 12:31 AM, James_in_Utah <James.Evans at hill.af.mil>wrote:

> Hi,
> I'm deploying the USDA NAIP image set on two of our servers on a closed LAN
> with about 20 users.  About half of the NAIP set on each server.  I'm also
> running MapCache on one of the servers with the cache being stored on an
> empty drive.  The NAIP set is divided up by states, and some of the states
> have more than one projection, for instance, California is in NAD83 UTM
> Zone
> 10 and Zone 11.  I've created a layer for each state, and if the state has
> more than one UTM Zone, then there is a layer for each of the zones.  So,
> for California, I have CA_Zone10, and CA_Zone11 layers.  So I probably have
> close to 100 layers representing all of CONUS.  Being lazy, I put the same
> "wms_extent" in the METADATA portion of each layer.  The extent is large
> enough to cover all of CONUS.  Will this cause performance issues?  All 100
> odd USDA_NAIP layers have the same "wms_extent:.  Will that cause MapServer
> to open each of the shape files looking for the requested bounding box?
>
> Also, I have all the NAIP layers on one server grouped into "USDA_NAIP",
> and
> all the NAIP layers on the other server grouped into "USDA_NAIP2", and the
> MapCache has added each of the these "Groups" as sources.  The users will
> just have to select both NAIP layers in MapCache.  Is there some way to
> have
> both "Groups" appear as one layer in MapCache?  Everything seems to be
> working, although it does seem slow, with just me hitting it so far.
>
> I've include my two California layers below as examples.  Any suggestions
> on
> optimizing this would be appreciated.  I'm using the latest dev release of
> MS4W.
> Thanks,
> James
>
>
>
>    LAYER
>       NAME "CA_Zone10"
>       GROUP "USDA_NAIP"
>       METADATA
>          "wms_title" "CA_Zone10"
>          "wms_name" "CA_Zone10"
>          #Extent for USA
>          "wms_extent" "-1154717.71708742, 2635432.86320029,
> 3632346.10222763, 6578042.27294455"
>          "wms_srs" "ESPG:26910"
>          "wms_style" "Default"
>          "wms_format" "image/png"
>       END
>       STATUS ON
>       TYPE RASTER
>       TILEINDEX "D:\\MapData\\USDANAIP\\ca\\Zone10.shp"
>       TILEITEM "Location"
>       PROJECTION
>          "init=epsg:26910"
>       END
>       MAXSCALEDENOM 1000000
>    END
>
>    LAYER
>       NAME "CA_Zone11"
>       GROUP "USDA_NAIP"
>       METADATA
>          "wms_title" "CA_Zone11"
>          "wms_name" "CA_Zone11"
>          #Extent for USA
>          "wms_extent" "-1154717.71708742, 2635432.86320029,
> 3632346.10222763, 6578042.27294455"
>          "wms_srs" "ESPG:26911"
>          "wms_style" "Default"
>          "wms_format" "image/png"
>       END
>       STATUS ON
>       TYPE RASTER
>       TILEINDEX "D:\\MapData\\USDANAIP\\ca\\Zone11.shp"
>       TILEITEM "Location"
>       PROJECTION
>          "init=epsg:26911"
>       END
>       MAXSCALEDENOM 1000000
>    END
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Does-wms-extent-of-a-layer-impact-performance-tp5099776.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------
The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of the
Interior.   Life is too short for undocumented, proprietary data formats.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140124/72173242/attachment.html>


More information about the mapserver-users mailing list