[GRASS5] anyone use/need fragstats?

Radim Blazek blazek at itc.it
Thu Jun 19 04:43:43 EDT 2003


On Wednesday 18 June 2003 18:47, John Gillette wrote:
> Radim,
>
> I have a question about:
> > v.patch input=a,b output=c1
> > v.clean input=c1 output=c2 tool=break,rmdupl
>
> Given:                 ___
>   _________           |   |
>  | A       |          |   |
>  |         |          |   |
>  |_________|          | B |
>                       |___|
>
> patch A,B gives:
>         ___
>      __|___|__
>     | A|   |  |    ?
>     |  |   |  |
>     |__|___|__|
>        | B |
>        |___|
>
> There are 4 intersections and 5 areas created
> by the patch operation in this example. What does
> "v.clean input=c1 output=c2 tool=break,rmdupl"
> do to patch's result?

v.clean breaks boundaries on intersections so that c2
realy contains 5 areas.

> I am interested in a v.mapcalc that would do A union B,
v.extract input=c4 output=x where="a is not null or b is not null"

> A intersection B, 
v.extract input=c4 output=x where="a is not null and b is not null"

A-B, 
v.extract input=c4 output=x where="a is not null and b is null"

B-A, 
v.extract input=c4 output=x where="a is null and b is not null"

> as well as Booleans like
> is_simple(A), is_convex(A).  
Not available.

> Are there library functions
> for doing such things in 5.1? I suspect that we are not
> quite there yet?

There are no such functions. I want only to remind, that such functions
working on 2 areas only, are useless in GRASS. Function overlaying
2 vectors must work on 2 complete input vector layers and produce new 
vector layer.

> Actually, I am more interested in having the library functions
> than having v.mapcalc.
>
> Could you tell me what you are working on with respect
> to these kinds of problems and what your plans are?

Currently I am doing nothing for this. For future, there
are 2 options, I think, 
1) develop these functions in GRASS
2) get rid of topological model (i.e. 5.1) and use GEOS

> Ref: general polygon clipper library (gpc)
>      http://www.cs.man.ac.uk/aig/staff/alan/software/index.html
>
>      CGAL, the Computational Geometry Algorithms Library
>      CGAL Basic Library Manuals, Polygon Operations
>      http://www.cgal.org/Manual/doc_html/index.html

Maybe better (in this context): http://geos.refractions.net/

Radim




More information about the grass-dev mailing list