[GRASS-dev] Re: Testing needed for v.buffer2
Hamish
hamish_b at yahoo.com
Wed Sep 10 18:56:19 EDT 2008
Росен Матев wrote:
> Thanks for pointing out all that. Strangely, I don't get those
> warnings here, probably command line switches...
this is what I use:
CFLAGS="-g -Wall -Werror-implicit-function-declaration" ./configure \
...
For debugging do not use -O for optimization and do not strip the
binaries with LDFLAGS="-s".
> I think they are fixed now.
thanks.
local_proto.h is missing from SVN.
rather than #define'ing MAX,MIN 4 times it is probably better to move
that into local_proto.h or so and include that in each .c file.
> I don't seem to have problems with centroids. Can you show me a map,
> on which that occurs?
they are all ok, just missing cat numbers.
spearfish test dataset, roads vector map:
GRASS64> v.buffer2 in=roads out=roads_30mbuff_try2 type=line dist=30
The tolerance in map units = 0.3
Lines buffers...
100%
Building parts of topology...
Building topology for vector map <roads_30mbuff_try2>...
822 primitives registered
Topology was built
Number of nodes : 822
Number of primitives: 822
Number of points : 0
Number of lines : 0
Number of boundaries: 822
Number of centroids : 0
Number of areas : -
Number of isles : -
Snapping boundaries...
All vertices : 35618
Registered points : 34788
Nodes marked as anchor : 34500
Nodes marked to be snapped: 288
Snapped vertices : 293
New vertices : 26
Breaking boundaries...
Intersections: 29912
Removing duplicates...
Duplicates: 13
Attaching islands...
Building topology for vector map <roads_30mbuff_try2>...
Building areas: 100%
14958 areas built
7 isles built
Attaching islands: 100%
Topology was built
Number of nodes : 16735
Number of primitives: 40014
Number of points : 0
Number of lines : 0
Number of boundaries: 40014
Number of centroids : 0
Number of areas : 14958
Number of isles : 7
Number of areas without centroid : 14958
Attaching centroids...
Building topology for vector map <roads_30mbuff_try2>...
Attaching centroids: 100%
Topology was built
Number of nodes : 16739
Number of primitives: 40018
Number of points : 0
Number of lines : 0
Number of boundaries: 40014
Number of centroids : 4
Number of areas : 20472
Number of isles : 216
Number of areas without centroid : 211
Rebuilding topology...
Building topology for vector map <roads_30mbuff_try2>...
1783 primitives registered
Building areas: 100%
215 areas built
215 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 1783
Number of primitives: 1783
Number of points : 0
Number of lines : 0
Number of boundaries: 1779
Number of centroids : 4
Number of areas : 215
Number of isles : 215
Number of areas without centroid : 211
# don't know if this really matters; combine line segments:
GRASS64> v.build.polylines in=roads_30mbuff_try2 out=roads_30mbufftry2b
1779 lines or boundaries found in vector map <roads_30mbuff_try2 at user2>
215 polylines stored to vector map <roads_30mbufftryb2user2>
Building topology for vector map <roads_30mbufftry2b>...
219 primitives registered
Building areas: 100%
215 areas built
215 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 219
Number of primitives: 219
Number of points : 0
Number of lines : 0
Number of boundaries: 215
Number of centroids : 4
Number of areas : 215
Number of isles : 215
Number of areas without centroid : 211
# the areas without centroids above are really holes/islands.
d.mon x0
d.vect roads_30mbuff_try2b type=area
d.vect roads_30mbuff_try2b type=centroid width=3 color=red
The 4 centroids that are there are fine, but missing cat numbers
# add them with:
v.category in=roads_30mbuff_try2b out=roads_30mbuff_try2bC type=centroid
Without "type=centroid" above it adds new centroids to all holes,
due to default includsion of type=area
Your code should give all centroids cat numbers (but not boundaries),
most processing modules (v.extract, ...) do so by looping through cats
and will not work without them. A centroid's cat number (as thus DB
attributes) is inherited by the surrounding area.
> And again, please help with the busroute11 test, cause
> it's behaving weirdly.
right, will do.
Hamish
More information about the grass-dev
mailing list