Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7218 closed (invalid)

GIS: ogrinspect sometimes gets field types wrong

Reported by: Jeremy Dunck Owned by: nobody
Component: GIS Version: gis
Severity: Keywords: ogr gdal shp shapefile geometry
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using census state, a multipolygon field is reported as polygon; similarly, tnris streets reports linestring for multilinestring.

Change History (3)

comment:1 by jbronn, 16 years ago

Component: UncategorizedGIS
Keywords: ogr gdal shp shapefile geometry added

comment:2 by jbronn, 16 years ago

Resolution: invalid
Status: newclosed

Marking this as invalid because it can't be fixed without scanning every feature in the shapefile. This is because the OGR driver can't differentiate between the formats:

"Note that when reading a Shapefile of type SHPT_ARC, the corresponding layer will be reported as of type wkbLineString, but depending on the number of parts of each geometry, the actual type of the geometry for each feature can be either OGRLineString or OGRMultiLineString. The same applies for SHPT_POLYGON shapefiles, reported as layers of type wkbPolygon, but depending on the number of parts of each geometry, the actual type can be either OGRPolygon or OGRMultiPolygon."

This is because the shapefile specification itself doesn't differentiate between Polygon and MultiPolygon.

comment:3 by Jeremy Dunck, 16 years ago

Maybe make a --robust flag?

Note: See TracTickets for help on using tickets.
Back to Top