[mapserver-users] TOLERANCE

Steve Lime Steve.Lime at dnr.state.mn.us
Mon Nov 23 19:07:50 EST 2009


Hi Ted:

1) Yes. 

2) The tolerances used in a feature query are from the layer(s) being
queried, that
is, the qlayer if you set that explicitly.

I wonder if you might be running into problems because your map units
are in
DD and/or the projections being done. Any chance you could whip up a
test
dataset to work from?

Steve

>>> Ted Spradley <tspradley at snoogems.com> 11/23/09 3:31 PM >>>

Hi all,

Simplifying from earlier.  

1. Does TOLERANCE apply to polygons (layers)?

    The documentation says it only applies to points, but I am finding
postings referring to it applying to 
    line and polygon features.

If yes to #1,

2. Using mode = itemfeaturequery to find a polygon in slayer=LAYER A,
then
qlayer=LAYER B, finding the
     polygons with in TOLERANCE of the polygon in LAYER A.  

   Does TOLERANCE get set in LAYER A or LAYER B? (tried it both ways and
it
doesn't seem to matter)

Thanks in advance,
Ted S

Here is the MAP file 

MAP
	NAME	"urlCountyApraisalDistricts"			#	WMS
Capabilities requires a Name and
a Title tag for every 
						#	layer. The Map’s
NAME and wms_title metadata will be used 
						#	to set the root
layer’s name and title in the 
						#	GetCapabilities
XML output. The root layer in the WMS 
						#	context
corresponds to the whole mapfile
						#
	SIZE            800 800
  EXTENT          -125 24 -65 50
	UNITS			DD
	IMAGECOLOR			100 100 255
  PROJECTION
    "init=epsg:4326"
  END

  IMAGETYPE PNG24
	SHAPEPATH	'/var/www/vhosts/url.com/subdomains/maps/mapserver/data/'
	STATUS	ON
  SYMBOLSET       "/usr/mapserver/mapserver-5.4.1/symbols/examples.sym"
  FONTSET         '/usr/share/fonts/fonts.list'
  CONFIG          "MS_ERRORFILE"
"/var/www/vhosts/url.com/subdomains/maps/mapserver/logs/cad1.log" 
  WEB
   	TEMPLATE        "mapserver.html"
   	IMAGEPATH      
"/var/www/vhosts/url.com/subdomains/maps/httpdocs/temp/"
    IMAGEURL        "/temp/"
    METADATA
     	"wms_title" "url WMS County Detail"
			"wfs_title"	"url WFS County Detail"
      "wms_srs" "EPSG:4326"
      "wfs_srs" "EPSG:4326"
			"wms_onlineresource"
"http://maps.url.com/cgi-bin/mapserv?map=/var/www/vhosts/url.com/subdomains/maps/httpdocs/mapserver/my_tests/county_cads&"
			"wfs_onlineresource"
"http://maps.url.com/cgi-bin/mapserv?map=/var/www/vhosts/url.com/subdomains/maps/httpdocs/mapserver/my_tests/county_cads&"
        END
	END

  QUERYMAP
    STATUS ON
    STYLE hilite
    COLOR 212 212 212
  END
  OUTPUTFORMAT
    NAME 'selected_parcel'
    DRIVER 'TEMPLATE'
    MIMETYPE 'text/html'
    FORMATOPTION 'FILE=selected_parcel.tmpl'
  END 
  SCALEBAR
    STATUS  embed
    INTERVALS 5
    ALIGN left
    POSITION lr
    SIZE 600 8
#    UNITS feet
    COLOR 0 0 0
    BACKGROUNDCOLOR 212 212 212
  END   # End Scalebar


  # Layer 'parcels' will draw individual property parcels and provide
owner
data
  LAYER
    NAME 'parcels'
    TYPE POLYGON
    STATUS          DEFAULT
    DEBUG			3
    TEMPLATE        'dummy'
    DUMP TRUE
    MAXSCALEDENOM 7000
    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname=cad1 user=user password=password host=localhost
port=5432"
    DATA            "the_geom from parcels using unique gid using
srid=-1"
    LABELITEM "owner_name"
  #  FILTERITEM objectid
    FILTER (objectid == "%objectid%")
    PROCESSING 'LABEL_NO_CLIP=1'
#    TOLERANCEUNITS FEET
#    TOLERANCE 300

    CLASS
#			SYMBOL 'circle'
#			SIZE 2
#      OUTLINECOLOR 212 212 212
      STYLE
        WIDTH 1 
        OUTLINECOLOR 0 255 0
      END
      LABEL
        COLOR 0 0 0
        #OUTLINECOLOR 0 255 0
        TYPE TRUETYPE
        FONT ARIAL
        SIZE 10
        BUFFER 5
        MINFEATURESIZE 20
     #   PARTIALS FALSE
        POSITION AUTO
        ANGLE AUTO
      END
    END   # End class     
    PROJECTION
      "init=epsg:2278"
    END
    METADATA
      "wms_title" "County Property Parcels"
      "wfs_title" "County Property Parcels"
      "wms_srs"	"epsg:102740"
      "gml_include_items" "all"
      "gml_featureid" "ogc_fid" ## REQUIRED
      "qstring_validation_pattern" '.'
    END
  END # End layer 'parcels'

  # This layer to compare geometries with previous
  LAYER
    NAME 'parcels_01'
    TYPE POLYGON
    STATUS          ON
    DEBUG			3
    TEMPLATE        'dummy'
    DUMP TRUE
    MAXSCALEDENOM 7000
    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname=cad1 user=user password=password host=localhost
port=5432"
    DATA            "the_geom from parcels using unique gid using
srid=-1"
    LABELITEM "owner_name"
    # FILTER - valid SQL WHERE clause
    PROCESSING 'LABEL_NO_CLIP=1'
    TOLERANCEUNITS feet
    TOLERANCE 300

    CLASS
#			SYMBOL 'circle'
#			SIZE 2
#      OUTLINECOLOR 212 212 212
      STYLE
        WIDTH 2
        COLOR 139 136 120
        OUTLINECOLOR 212 212 212
      END
      LABEL
        COLOR 0 0 0
        #OUTLINECOLOR 0 255 0
        TYPE TRUETYPE
        FONT ARIAL
        SIZE 10
        MINFEATURESIZE 20
     #   PARTIALS FALSE
        POSITION AUTO
        ANGLE AUTO
      END
    END   # End class     
    PROJECTION
      "init=epsg:2278"
    END
    METADATA
      "wms_title" "County Property Parcels Comparison Layer"
      "wfs_title" "County Property Parcels Comparison Layer"
      "wms_srs"	"epsg:102740"
      "gml_include_items" "all"
      "gml_featureid" "ogc_fid" ## REQUIRED
      "qstring_validation_pattern" '.'
    END
  END # End layer 'parcels_01'
END # End map

     
-- 
View this message in context:
http://n2.nabble.com/TOLERANCE-tp4054120p4054120.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



More information about the mapserver-users mailing list