在Mapserver地图文件中使用WFS和PostGis时发生异常

发布于 2024-12-09 22:33:33 字数 1862 浏览 0 评论 0原文

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

谁可以帮忙告诉发生了什么?

环境:mapserver5.6.1,postgis8.4,

shp数据源的openlayers2.10,适用

    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

I'm trying to use GML produced by Mapserver to create popup with openlayers, if datasource comes from shp file, everything is working fine, however, postgis datasource brings exception, like "This may be due to a corruption of the heap, which indicates a bug in HTTPFormServer.exe or any of the DLLs it has loaded." Another, if I just read layer data from postgis to render label instead of as WFS, it's working fine as well

who can help tell what happend?

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

for postgis datasource, exception happend

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半步萧音过轻尘 2024-12-16 22:33:33

我发现这是mapserver-5.6.1的一个bug,就是msPostGISBuildSQLBox分配的内存不够,放大就可以了。

I find it's a bug in mapserver-5.6.1, that is, allocated memory is not enough in msPostGISBuildSQLBox, enlarge is ok.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文