[R-sig-Geo] Individualizing polygons

Roger Bivand Roger.Bivand at nhh.no
Fri Apr 24 22:03:28 CEST 2009


On Fri, 24 Apr 2009, Ervan Rutishauser wrote:

> Dear all,
>
> I'm new to this list and spatial analyses, apologize for any repetition 
> from previous question. I exported a shapefile from ArcView, 
> representing gap areas on several forest plots. In ArcView, the 
> attribute table (or dbf) sepcifies notably the gap ID and the plot ID. I 
> imported successfully this shapefile in R, using readShapePoly(), 
> however it seem that the plot ID information is no longer available in 
> the SpatialPolygoneDataFrame object. This raise several questions:

If the DBF fields do not include the one you are looking for, then it will 
not be read into R. If you are only selecting the gap polygons to export, 
then most likely they do not have plot IDs, right?

>
> 1.  Do I have to name the gaps in function of the plot to not lose this 
> information? Secondly, I would like to work with individual polygons in 
> each plot.
>
> 2.  How to handle single polygon from a polygone list? Finally, I would 
> like to transform the gaps coordinates (UTM WSG84) in relative 
> coordinates (xy coordinates in the plot 250mx250m).
>
> 3.  Does the function elide() allows to do that? Or any other way to do 
> that?

You may use the elide() method for this (using the shift= argument to 
provide the offsets), or use +x0= and +y0= offsets in a 
custom projection with spTransform() methods in rgdal. You could get the 
relevant offsets from bbox() of the imported object.

Hope this helps,

Roger



>
> I spent quite long time looking for tutorials on the web, but couldn't 
> find any. Any suggestion... Thank you very much for any advice and help.
>
> Best regards,
> Ervan
> ______________________________________________________________________________
>
> Ervan Rutishauser
> PhD student
> CIRAD - UMR AMAP
> BP 701
> 97387 Kourou Cedex
> tel. 00594.594.32.92.96
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list