There is a little problem with the approach I described in my previous email.
In ADE-4, coordinates are given in pixel and so Y are inverted. You must invert your Y coordinates to obtain the good representation in ArcView. An example:


> library(ade4)
> library(shapefiles)
> library(maptools)
> try1 <- read.shapefile(paste(ShapeDir, "columbus", sep="/"))
> shppolys <- shape2poly(try1, as.character(try1$dbf$dbf$NEIGNO))
> obj=poly2area(shppolys)
> obj[,3]=-obj[,3]
> write.table(obj,"try.area",col.names=F,quote=F,row.names=F)
>

Then, use the 'From AREA' function in AVADE.



At 10:32 25/02/2004, Patrick Giraudoux wrote:
I am not sure a previous e-mail reached the list (no mail aknowledgement from R-boundle etc.). The question was how to write polygon
or segment coordinates into a shapefile set or any other ArcGIS supported format. The library shapefiles seems to do something but
the documentation is a bit beyond of my mind.... and I cannot get the meaning of the functions write**** and its application to the
case below:


In simple words, is there a somewhere a function taking polygon coordinates (or simple segments) within R to a "ready to read" set
of files ***.shp, ***.shx, etc...


Thanks in advance for any hint

Patrick



----- Original Message -----
From: "Patrick Giraudoux" <[EMAIL PROTECTED]>
To: "r-help" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 1:08 PM
Subject: writing polygons/segments to shapefiles (.shp)


> Dear all,
>
> The library maptools offers a fantastic support for shapefile reading.
>
> Is there a R library available permitting the writing of polygon or segment coordinates into shapefile?
>
> Thanks for any hint,
>
> Patrick Giraudoux
>
>
>
>


______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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
E-mail : [EMAIL PROTECTED]
--------------------------------------------------------------------------------------------------


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

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to