Opened 9 years ago

Closed 8 years ago

Last modified 8 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: UI/UX:

Description

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

Change History (3)

comment:1 Changed 9 years ago by jbronn

Component: UncategorizedGIS
Keywords: ogr gdal shp shapefile geometry added

comment:2 Changed 8 years ago by jbronn

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 Changed 8 years ago by Jeremy Dunck

Maybe make a --robust flag?

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