在Mapserver mapfile中使用WFS和PostGis时发生异常

时间:2011-10-14 05:51:32

标签: postgis mapserver map-files

我正在尝试使用Mapserver生成的GML来创建带有openlayers的弹出窗口,如果数据源来自shp文件,一切正常,但是,postgis数据源会带来异常,例如“这可能是由于堆的损坏,表示HTTPFormServer.exe或其加载的任何DLL中的错误。“另外,如果我只是将postgis中的图层数据读取为渲染标签而不是WFS,那么它也可以正常工作

谁能帮忙说明发生了什么?

environment:mapserver5.6.1,postgis8.4,openlayers2.10

for shp data source,works

    LAYER
        NAME poi_point
        METADATA
          "wfs_title"         "poi_point" ##REQUIRED
          "wfs_typename"      "poi_point" ## REQUIRED
          "gml_include_items" "all" ## Optional (serves all attributes for layer)
          "gml_featureid"     "ID" ## REQUIRED
          "gml_geometries"    "geometry"
          "gml_geometry_type" "point"
        END
        PROJECTION
            "proj=latlong"
            "ellps=GRS80"
            "datum=NAD27"
        END 


        DATA poi_point
        STATUS ON
        TYPE POINT
        DUMP TRUE
        MAXSCALEDENOM  2400
        CLASS
            STYLE
                COLOR 0 0 0
                OUTLINECOLOR 255 255 255
            END
        END
    END

用于postgis数据源,异常发生

LAYER
    NAME poi_point
    DATA "the_geom from poi_point"
    METADATA
      "wfs_title"         "poi_point" ##REQUIRED
      "wfs_typename"      "poi_point" ## REQUIRED
      "gml_include_items" "all" ## Optional (serves all attributes for layer)
      "gml_featureid"     "ID" ## REQUIRED
      "gml_geometries"    "geometry"
      "gml_geometry_type" "point"
    END
    PROJECTION
        "proj=latlong"
        "ellps=GRS80"
        "datum=NAD27"
    END 

    CONNECTION "user=postgres password=springtime dbname=postgis host=localhost port=5432"
    CONNECTIONTYPE postgis
    STATUS ON
    TYPE POINT
    DUMP TRUE
    MAXSCALEDENOM  2400
    CLASS
        STYLE
            COLOR 0 0 0
            OUTLINECOLOR 255 255 255
        END
    END
END

1 个答案:

答案 0 :(得分:0)

我发现它是mapserver-5.6.1中的一个错误,也就是说,在msPostGISBuildSQLBox中分配的内存不够,放大就可以了。