0

I'm trying to import shapefiles (in this case, OpenStreetMap data) into GRASS (grass70-svn) using v.in.ogr; and it is painfully, brutally slow. At first I thought this was because I was using the default sqlite database on an NFS mount. But, trying sqlite on a local disk and trying MySQL to separate server both failed to improve performance. I'm getting a consistent read/write of ~125Kbps/~550Kbps no matter which shapefile or which database I use.

I cannot see any bottlenecks anywhere, as the two python /path/to/grass-gui processes are averaging 10% of one core combined, the network utilization is below 10% consistently, and the DB server is almost quiescent. To give an example of how painful this is:

v.in.ogr dsn=/home/justin/downloads/osm_CA/places.shp                           
WARNING: All available OGR layers will be imported into vector map <places>
Check if OGR layer <places> contains polygons...
Importing 7020 features (OGR layer <places>)...
-----------------------------------------------------
Building topology for vector map <places@OSM>...
Registering primitives...
7020 primitives registered
7020 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 7020
Number of points: 7020
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
(Fri Jan 31 19:01:08 2014) Command finished (4 min 38 sec)

Any guidance on how to remediate this problem, or at least find the bottleneck? I'm stumped.

2
  • 1
    What is your OS, Linux, Mac OS X, and your grass70-svn came from where ? I don't have any problem to import osm shapefiles (> 10000 features) within seconds (local SQLite)
    – gene
    Feb 1 '14 at 12:08
  • Did you check: grasswiki.osgeo.org/wiki/GRASS_Debugging?
    – webrian
    Feb 2 '14 at 18:50
1

For the record here: Discussion continued here:

http://trac.osgeo.org/grass/ticket/2185#comment:2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.