Mapserver debug map file


















The data from the current layer will only be rendered where it intersects features from the [layername] layer. The width of a map in geographic units can be found by calculating the following from the extents:. This keyword allows for arbitrary data to be stored as name value pairs. It can also allow more flexibility in creating templates, as anything you put in here will be accessible via template tags.

Additional library to load by MapServer, for this layer. Passes a processing directive to be used with this layer. The supported processing directives vary by layer type, and the underlying driver that processes them. Attributes Directive - The ITEMS processing option allows to specify the name of attributes for inline layers or specify the subset of the attributes to be used by the layer, such as:.

Connection Pooling Directive - This is where you can enable connection pooling for certain layer layer types. Connection pooling will allow MapServer to share the handle to an open database or layer connection throughout a single map draw process.

Additionally, if you have FastCGI enabled, the connection handle will stay open indefinitely, or according to the options specified in the FastCGI configuration. Kernel density radius - Radius in pixels of the gaussian filter to apply to the bitmap array once all features have been accumulated. Higher values result in increased cpu time needed to compute the filtered data.

Such behavior may not be desirable typically for tiling as the resulting intensity of a pixel at a given location will vary depending on the extent of the current map request. If set to a numeric value, the samples will be multiplied by the given value. It is up to the user to determine which scaling value to use to make the resulting pixels span the full range; determining that value is mostly a process of trial and error. Pixels that fall outside the range will be clipped to 0 or This avoids changes in label position as extents change between map draws.

It also avoids duplicate labels where features appear in multiple adjacent tiles when creating tiled maps. This avoids changes in the line styling as extents change between map draws. It also avoids edge effects where features appear in multiple adjacent tiles when creating tiled maps. Native filter Directive - This directive can be used to do driver specific filtering. AGG renderer tweaking - This directive can be used for setting the linear gamma to be used when rendering polygon features.

The default value of 0. A value of 0. Raster Directives - All raster processing options are described in Raster Data. Sets the current status of the layer. Often modified by MapServer itself. Default turns the layer on permanently. The style information may be represented by a separate attribute style string attached to the feature. MapServer supports the following style string representations:. Currently only a few data sources support storing the styles along with the features like MapInfo, AutoCAD DXF, Microstation DGN , however those styles can easily be transferred to many other data sources as a separate attribute by using the ogr2ogr command line tool as follows:.

It is these times when you should try the same request, that was sent through your web server, at the commandline with the actual mapserv or on Windows, the mapserv.

There are two ways to define projections in a mapfile. You can either use inline projection parameters or specify an EPSG code for that projection. This database lookup takes significantly more resources than when the projection parameters are defined inline. This lookup takes place for each projection definition using EPSG codes in a mapfile.

It should be stated that for optimal performance you could have MapServer not do any projections on-demand in other words, have all of your source data in the same projection, and have MapServer output requests in that same projection but obviously this is not always possible for all scenarios. Implemented back in MapServer 4.

Common file extensions for includes are:. You can name them any file extension that you wish. Turn off unnecessary layers; the more layers MapServer is displaying, the more time it takes. Have your opening map view show only the minimum necessary to orient the user, and allow them to turn on additional layers as needed. This is particularly true of remote WMS or very large rasters. It also makes for a really cool effect, that the national boundaries magically change to state boundaries.

If your dataset has data that are relevant at different zoomlevels, then you may find this a very handy trick. Classes are processed in order, and a feature is assigned to the first class that matches. For example, if you wanted to highlight the single state of Wyoming, you would probably do this:. Use tile indexes instead of multiple layers.

Although MapServer can read any GDAL supported vector or raster source and the fact that not all users will be setting up tile caching beforehand , the following is still recommended for MapServer for optimal performance in terms of data formats. PostGIS is therefore recommended.

In technical terms, there are msDebug calls in various areas of the MapServer code that generate information that may be useful in tuning and troubleshooting applications. Any file extension can be used, but. The file will be created, if it does not already exist. Starting with MapServer 6.

If you are using Microsoft IIS, your debug messages will be sent to stdout i. With IIS it is recommended to direct output to a file instead. No msDebug output at all. Level 1 includes all output from Level 0 plus msDebug warnings about common pitfalls, failed assertions or non-fatal error situations e.

Level 2 includes all output from Level 1 plus notices and timing information useful for tuning mapfiles and applications. All of Level 2 plus some debug output useful in troubleshooting problems such as WMS connection URLs being called, database connection calls, etc.

When set, this value is used as the default debug level value for all map and layer objects as they are loaded by the mapfile parser. This option also sets the debug level for any msDebug call located outside of the context of a map or layer object, for instance for debug statements relating to initialization before a map is loaded. If a DEBUG value is also specified in the mapfile in some map or layer objects then the local value in the mapfile takes precedence over the value of the environment variable; debug info coming from outside of the context of a map or layer object cannot be turned off by having DEBUG OFF in the mapfile.

This could be very helpful for problems with accessing raster files and PostGIS tables. The main GDAL site also has a list. For the full list of possible PROJ variables to use see the official list. The recommended way to test your mapfile is to use the MapServer commandline utility shp2img , to verify that your mapfile creates a valid map image. Use this setting to set the debug level for the MAP object and all layers.



0コメント

  • 1000 / 1000