Opened 14 years ago
Closed 14 years ago
#3365 closed defect (fixed)
Segfault when using Shapefile with empty geometry and tileindex
Reported by: | adube | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | MapServer C Library | Version: | 5.6 |
Severity: | normal | Keywords: | tileindex, shapefile, empty, geometry |
Cc: | dmorissette |
Description
Problem
When using a TILEINDEX with shapefiles that contain empty geometry values, MapServer crashes (segfault). The shapefiles were exported from a PostGIS database using shp2pgsql.
Other cases
1) When using a TILEINDEX with shapefiles that have no geometry property, MapServer outputs an error message, which is okay. The shapefiles were exported from a PostGIS database using ogr2ogr.
2) When using shapfiles that either contain empty geometry values or no geometry property, MapServer correctly renders the map.
More detailed explanations
The shapefiles were exported from a PostGIS database. They were normalized using the ST_Simplify method, which doesn't preserve the topology. I originally used pgsql2shp for the conversion and I use an index in my mapfile so I sometime had no map rendered at some spots and found out why (see Problem above).
Using ogr2ogr instead, 2) happens.
Solution
Switching to ST_SimplifyPreserveTopology solved my problem, but a crash is never normal (hence this ticket).
Sample
Attached is a sample demonstrating the problem. See the readme.txt file for more details.
Attachments (1)
Change History (2)
by , 14 years ago
Attachment: | 3365.tar.gz added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sample data with mapfile to reproduce the problem, see readme.txt for urls to use