v.in.shape.pg

David D Gray ddgray at armadce.demon.co.uk
Wed Jul 12 15:27:56 EDT 2000


Moritz Lennert wrote:
> 
> When I launch v.in.shape.pg on a shapefile containing 250 polygons
> (according to the number of lines in the resulting postgres table) it
> takes hours and hours (well, at least I imagine since I Ctrl-C'd the
> process) to check the arcs.
> What does "Checking arc X" mean ? Is this really necessary ?
> 
> Moritz


The function concerned is necessary. A few months ago we started to
update the shapefile handling routines in GRASS, because they were
either unavailable or only partially implemented. One problem was that
the old import filter did not have a means of finding a valid area point
(centroid?) for the polygon. The other was that lines in shapefiles are
the whole closed circumference of a ring (or of a primary island), and
GRASS needs individual line segments split at nodes. The arc-checking
routine is involved in splitting the lines, but it is, as you see, very
slow.

The simple v.in.shape has more efficient routines. It will import a
shapefile of up to 10,000 polygons in at most a few minutes (350MHz /
128 MB RAM). This doesn't have postgres support yet, but we agreed to
merge the two modules, and this should be ready in afew days

David




More information about the grass-user mailing list