Ticket #2932 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Shapefile import deficiencies (patch)

Reported by: tms13 Owned by: cbro@…
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

The current implementation of shapefile reading has the following issues:

  • Coincident nodes are not shared between features
  • Polygons with holes are not converted to multipolygon relations
  • Projection is done one node at a time, rather than a geometry at a time (x2 performance hit(*))

(*) I'm guessing that the GDAL library can use SIMD instructions when doing bulk transforms, which might explain this.

My patch is tested and ready to apply.

Note that the Ordnance Survey "VectorMap? District" NaturalFeature_Area.shp tiles have lots of 'Custom Landform' polygons with holes, so performance can be improved by generating a more specific file using ogr2ogr to crop or select features. It may be an idea to somehow allow the user to specifiy what feature types should be imported...

Attachments

2392.patch Download (10.6 KB) - added by tms13 4 years ago.
Patch to overhaul shapefile import

Change History

Changed 4 years ago by tms13

Patch to overhaul shapefile import

comment:1 Changed 4 years ago by Koying

Please go ahead. If you are sure of your stuff, you don't have to go thru trac/patch... It's not like the trunk is supposed to be bulletproof ;-)

Small trick if you are not aware: If you put something like "(fixes #nnnn)", with nnnn being a trac ticket number, in you commit message, the ticket will be closed when you commit, with a back reference to the changeset.

comment:2 Changed 4 years ago by tspeight

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

(In [21132]) Extend and rework shapfile importer (fixes #2932).

Note: See TracTickets for help on using tickets.