[R-sig-Geo] Re: [GRASSLIST:5091] from adehabitat to grass

Stephane DRAY stephane.dray at umontreal.ca
Thu Dec 9 20:04:53 CET 2004


>
>Neither of the R functions you mention: area2shape() and export.shape(),
>are in packages ade4 or adehabitat. Using the R maptools package, your
>test1.* and test2.* are readable (so readable with shapelib), but test1.*
>has overlapping polygons. If we could convert "area" objects to the
>current "polylist" or future package sp representations, the
>write.polylistShape() function (using shapelib) in maptools could be used.

we can do it with area2poly of ade4


>A current effort in R is to establish foundation classes - which will let
>us have many-to-one, one-to-many converters. So a first step will be to
>convert area to some such class, then write that as a polygon shapefile.
>Which GRASS shapefile reading program are you using (which version)?
>
> >
> > I believe it would be better to import "area" objects directly, but the
> > module R-GRASS apparently cannot do that. Is there any suggestion?
>
>No, not "area" class objects. Then we get many-to-many. It is much better
>to reduce to a single foundation class set first, then the interface would
>work for all points, lines, polygons, etc., without having to write a
>separate interface for each R class.
>
>For vector, it will be some time before the GRASS libaries are as stable
>as raster is and sites were, so using loose coupling through files is more
>robust for now. The interface can be extended to do this using system() in
>R. Is it worth putting a "new generation" R/GRASS interface based on the
>current one on sourceforge?
>
>Best wishes,
>
>Roger

I agree with Roger,
Different kind of spatial data classes have been implemented in R. It seems 
difficult, at the moment,  that each developper transforms its code to 
adopt a unique class for spatial objects.
area objects are an heritage from ADE-4 software and has been implemented 
in the ade4 package.
Clement calenge create a class for these objects in adehabitat, and use 
area2dxf to export data into GIS.
Export functions exist in maptools and area2poly (and poly2area) is 
available in ade4, there is no real need for an area2shape.

Sincerely.





Stéphane DRAY
-------------------------------------------------------------------------------------------------- 

Département des Sciences Biologiques
Université de Montréal, C.P. 6128, succursale centre-ville
Montréal, Québec H3C 3J7, Canada

Tel : (514) 343-6111 poste 1233         Fax : (514) 343-2293
E-mail : stephane.dray at umontreal.ca
-------------------------------------------------------------------------------------------------- 

Web                                          http://www.steph280.freesurf.fr/




More information about the R-sig-Geo mailing list