[GRASS-user] v.in.ascii and overlapping areas

Nick Cahill ndcahill at wisc.edu
Mon Mar 31 23:22:04 EDT 2008


I am trying to use GRASS to do distribution maps of objects from an  
archaeological site. Some have exact findspots (points), others have  
general findspot areas (boxes). I have tried to export these using a  
standard v.in.ascii file. I export the four coordinates of the box  
boundary, and then a centroid placed at the center of the box. For  
instance:

B 5
   105.8 -93.2
   108.3 -93.2
   108.3 -95
   105.8 -95
   105.8 -93.2
C 1 1
   107.05 -94.1
  1 25


so the five coordinates of the boundary are the NW, NE, SE and SW  
corners of the boundary, and the centroid is placed in the middle.

Unfortunately many of these areas overlap or are identical, and GRASS  
is giving me errors:

$ v.in.ascii input=/Users/nick/Desktop/ObjectVectorInfo.txt  
output=objects_test format=standard
Building topology ...
Registering lines:
149 primitives registered
Building areas:
Topology was built.
Number of nodes     :   133
Number of primitives:   149
Number of points    :   51
Number of lines     :   0
Number of boundaries:   49
Number of centroids :   49
Number of areas     :   40
Number of isles     :   40
Number of incorrect boundaries   :   9
Number of centroids outside area :   5
Number of duplicate centroids    :   10
Number of areas without centroid :   6

v.in.ascii complete.




I wrote incorrect boundaries to an error map with v.build; the errors  
are apparently all boundaries that are either contained within another  
boundary, or identical to another boundary. Does GRASS not allow you  
to have two objects with identical boundaries? I don't know where the  
"centroids outside areas" come from; all the centroids are within the  
areas, although some of the areas are odd (there are objects for which  
we know the exact east coordinate, but not the exact north coordinate,  
so I had to draw them as a line; GRASS wouldn't accept that, so I  
added 0.001 to one coordinate to make it into a proper box; but still,  
the centroid should be insde that very thin box). Is it getting  
confused about which centroids go with which boundaries I wrote a  
centroid for each boundary, so don't understand why it's ending up  
with areas w/o centroids.

I'd be happy to post the raw data somewhere, or attach it.

So I tried another method, importing just the first artifact to a new  
vector, and then importing each subsequent artifact to a temp file and  
then using v.patch to bring it into the main vector file. This gave  
other problems - GRASS couldn't seem to keep up with the stream of  
commands, so it was being given unintelligible directions, and died.  
Is there a way to slow down the stdin so GRASS can keep up?

I saw a question from Jason Horn about a year ago about v.in.ascii and  
overlapping areas, but no answers to it. (http://lists.osgeo.org/pipermail/grass-user/2007-February/038216.html 
)

Any help would be greatly appreciated!

Nick Cahill




More information about the grass-user mailing list