[GRASS5] ring routines revisited

Developers

In a recent posting I proposed to adjust the routines
Vect_get_area_points() and Vect_get_isle_points(). In place of that I
have now uploaded two similar routines Vect_get_unique_area_points() and
Vect_get_unique_isle_points(), which produce a ring from the exterior
boundary edges of a polygon, but without duplicating the points at the
junction.

The old routines are still there. However I can't think of any good
reason why the junction points (at nodes) should be duplicated in a
ring, so unless anyone knows of a routine that specifically needs that
feature, the old routines could be deleted, and the new ones renamed
(only v.out.shape depends on the new routines so far).

David

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

David D Gray wrote:

Developers

In a recent posting I proposed to adjust the routines
Vect_get_area_points() and Vect_get_isle_points(). In place of that I
have now uploaded two similar routines Vect_get_unique_area_points() and
Vect_get_unique_isle_points(), which produce a ring from the exterior
boundary edges of a polygon, but without duplicating the points at the
junction.

The old routines are still there. However I can't think of any good
reason why the junction points (at nodes) should be duplicated in a
ring, so unless anyone knows of a routine that specifically needs that
feature, the old routines could be deleted, and the new ones renamed
(only v.out.shape depends on the new routines so far).

I think the new function may safely replace the old one. If you want to
keep the old one, just rename it and mark it for further deletion. Some
grass commands sure wants the new one : duplicate points in lines may
be confusing for some applications. I added (in the pre-5.0 era) some
lines in the vlib prune function for eliminating duplicate points...

I made an extensive search on the sources and find that there is only a few
command that use the routine (and some, like export commands, are probably
not happy with duplicate points). Vect_get_isle_points() is used in less
function (those marked *):

./src/libes/vect32/Vlib/get_area.c* définition in Vlib...
./src/libes/vect32/Vlib/poly.c*
./src/libes/vect32_64/Vlib/get_area.c*
./src/libes/vect32_64/Vlib/poly.c*

./src/display/d.area/plot.c duplicate point not usefull !
./src/display/d.vect.cats/plotCat.c
./src/display/d.what.vect/cmd/what.c*
./src/mapdev/v.area/area_perim.c
./src/mapdev/v.area/do_v_stats.c*
./src/mapdev/v.cutter/interior.c duplicate point may be a problem ?

./src/mapdev/v.out.idrisi/main.c export functions
./src/mapdev/v.out.moss/area_to_moss.c obsolete ?
./src/mapdev/v.out.shape/write_areas.c works with new routine
./src/mapdev/v.to.rast/do_areas.c
./src/mapdev/v.out.atlas/write.c
./src/mapdev/v.out.mapinfo/area_to_mpinfo.c
./src/mapdev/v.out.mif/plot.c*
./src/mapdev/v.to.db/areas.c*
./src/ps.map/ps.map.new/cmd/ps_area.c*

./src/tcltkgrass/src/draw.c source unused
./src.contrib/CERL/SGI/ISM/dig2ann/main.c
./src.contrib/SCS/vector/v.report/cmd/do_v_stats.c*
./src.garden/grass.informix/d.vect.inf/plotCat.c
./src.garden/grass.java/GRASS_Mapinfo.c
./src.garden/grass.oracle/d.vect.ora/plotCat.c
./src.garden/grass.oracle/v.reclass.ora/modCat.c
./src.garden/grass.postgresql/d.vect.pg/plotCat.c
./src.garden/grass.postgresql/d.what.v.pg/getCat.c

--
Michel Wurtz ENGEES - CEREG
                1, quai Koch - BP 1039, F-67070 STRASBOURG cedex
                Tel: +33 03.88.24.82.45 Fax: +33 03.88.37.04.97

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'