Mapserver:如何使用TOLERANCEUNITS?

时间:2019-07-18 08:19:16

标签: pixel mapserver getfeatureinfo

MapServer版本7.0.4。,SHP中的数据(点)。

我想将getFeatureInfo与TOLERANCEUNITS PIXELS一起使用,但是出了点问题-搜索未返回任何结果。找不到匹配的记录。

我用getFeatureInfo生成了url,bbox位于该点(1m缓冲区)周围。有TOLERANCE的两个实验:

 1. 
OK, RESULT EXISTS
TOLERANCEUNITS METERS
TOLERANCE 10

 2. 
NO RESULTS
TOLERANCEUNITS PIXELS
TOLERANCE 65

还有一些针对BBOX和TOLERANCE中的缓冲区的实验。公差单位:

 3. 
OK, RESULT EXISTS
TOLERANCEUNITS PIXELS
TOLERANCE 66 


 4. 
BBOX - buffer 0.5 m
TOLERANCEUNITS PIXELS
breakpoint of TOLERANCE: 125 px (no), 126 px (yes)

5. 
BBOX - buffer 1 m
TOLERANCEUNITS PIXELS
breakpoint of TOLERANCE: 116 px (no), 117 px (yes)

6.
BBOX - buffer 10 m
TOLERANCEUNITS PIXELS
breakpoint of TOLERANCE: 129 px (no), 130 px (yes)



7.
BBOX - buffer 10 m
TOLERANCEUNITS METERS
breakpoint of TOLERANCE: 5 m (no), 6 m (yes)


8. BBOX - buffer 100 m
TOLERANCEUNITS METERS
breakpoint of TOLERANCE: 105 m (no), 106 m (yes)

9. BBOX - buffer 1000 m
TOLERANCEUNITS METERS
breakpoint of TOLERANCE: 534 m (no), 535 m (yes)

我的地图文件:

MAP
    NAME opatreni

    IMAGETYPE png
    SIZE 1000 1000
    UNITS METERS
    EXTENT 1327926 6145626 2112791 6684240

    SYMBOLSET '../config/symbol.sym'
    SHAPEPATH '/var/www/terezian/web/data/'

    CONFIG "PROJ_LIB" "/usr/share/proj/"
    CONFIG "MS_ERRORFILE" "/mapserv/log/mapservlog.txt"
    DEBUG 5

    WEB
        #EMPTY 'mapserv/emptyQuery.html'
        ERROR 'mapserv/error.html'
        #IMAGEPATH "tmp/mapserv/"
        METADATA
            "wms_srs"             "EPSG:3857"
             ows_enable_request "*"
            "WMS_FEATURE_INFO_MIME_TYPE" "geojson"

            "wfs_enable_request" "*"  # necessary
            "wfs_getfeature_formatlist" "gml,geojson"
        END
    END 

    PROJECTION
        "init=epsg:3857"
    END

    LEGEND
        STATUS ON
        KEYSIZE 30 15
        LABEL
            TYPE BITMAP
            SIZE MEDIUM
            COLOR 0 0 89
        END
    END
    OUTPUTFORMAT
        NAME "geojson"
        DRIVER "TEMPLATE"
        FORMATOPTION "FILE=../query/opatreni.js"
    END


    LAYER

       NAME 'opatreni'
       TYPE POINT

       METADATA
         "wms_extent" "1327926 6145626 2112791 6684240"
         "ows_include_items" "all"
         "gml_include_items" "all" 
       END

       PROJECTION
           'init=epsg:3857'
       END

       DATA 'opatreni_3857/opatreni'

       TEMPLATE "dummy"

       EXTENT 1327926 6145626 2112791 6684240
       UNITS METERS
       #SIZEUNITS PIXELS
       TOLERANCEUNITS METERS
       TOLERANCE 535

       DEBUG 5

       CLASS
         NAME "opatreni"
         STYLE
           SYMBOL "circle"
           COLOR 218 165 32
           OUTLINECOLOR 54 41 8
           SIZE 15
         END
       END 
   END
END

0 个答案:

没有答案