[GRASS5] anyone use/need fragstats?

Radim Blazek blazek at itc.it
Wed Jun 18 11:58:03 EDT 2003


On Wednesday 18 June 2003 16:49, Jeff D. Hamann wrote:
> If I "patch" two (or more) vector files I need for each of the resulting
> polygons to contain the attributes from each of the component polygons.
> Basically, I need the arc/info UNION functionality which means I need to be
> able to have multiple attributes with each polygon.

If I understand well, there is not such module, but it should be possible
to get such result with sequence of commands (say that we have 2 area maps
a and b with attached tables in postgres):

v.patch input=a,b output=c1
v.clean input=c1 output=c2 tool=break,rmdupl
v.category input=c2 output=c3 option=del
v.category input=c3 output=c4 type=area
echo "create table c4 (id int, a int, b int)" | db.execute
v.db.connect map=c4 driver=pg database=db key=id table=c4
v.to.db map=c4 option=cat col1=id
v.distance from=c4 to=a from_type=centroid to_type=area max=0 upload=cat column=a
v.distance from=c4 to=b from_type=centroid to_type=area max=0 upload=cat column=b
Create a view in postgres from a, b and c. 

:-)

To put it to one module, should not be a big problem (I mean regular module,
not script).

Radim




More information about the grass-dev mailing list