Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#7218 closed (invalid)

GIS: ogrinspect sometimes gets field types wrong

Reported by: jdunck 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:


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

Change History (3)

comment:1 Changed 8 years ago by jbronn

  • Component changed from Uncategorized to GIS
  • Keywords ogr gdal shp shapefile geometry added

comment:2 Changed 7 years ago by jbronn

  • Resolution set to invalid
  • Status changed from new to closed

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 7 years ago by jdunck

Maybe make a --robust flag?

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