在Mapserver地图文件中使用WFS和PostGis时发生异常
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这是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.