Re: [R] [R-sig-Geo] How to extract coordinates values from a shapefile?

From: Nikhil Kaza <nikhil.list_at_gmail.com>
Date: Wed, 09 Jun 2010 16:20:22 -0400

What does coordinates() give for a polygon? centeroid? I suppose I could look up the code, but it would be immensely helpful if the help page could specify it.

regards
Nikhil

On Jun 9, 2010, at 3:50 PM, Rodrigo Aluizio wrote:

> I'm not sure if this is what you want. But the function
> coordinates() in sp package gives you the coordinates of
> SpatialObjects.
>
> Regards.
>
> Rodrigo.
>
> 2010/6/9 Nikhil Kaza <nikhil.list_at_gmail.com>
> You need to execute gpclibPermit() to enable gpclib.
>
> library(maptools) should have issued a warning to that effect.
>
>
> Nikhil Kaza
> Asst. Professor,
> City and Regional Planning
> University of North Carolina
>
> nikhil.list_at_gmail.com
>
> On Jun 9, 2010, at 3:34 PM, Thiago Veloso wrote:
>
> > Dear Nikhil,
> >
> > Thank you for your input. I tried your suggestion and received the
> > following error:
> >
> > > fortify(br)
> > Using UF_05 to define regions.
> > Error: isTRUE(gpclibPermitStatus()) is not TRUE
> > >
> >
> > Do you know what else could be done?
> >
> > Best wishes,
> >
> > Thiago.
> >
> > --- On Wed, 9/6/10, Nikhil Kaza <nikhil.list_at_gmail.com> wrote:
> >
> > From: Nikhil Kaza <nikhil.list_at_gmail.com>
> > Subject: Re: [R-sig-Geo] How to extract coordinates values from a
> > shapefile?
> > To: "Thiago Veloso" <thi_veloso_at_yahoo.com.br>
> > Cc: r-sig-geo_at_stat.math.ethz.ch
> > Date: Wednesday, 9 June, 2010, 16:00
> >
> > Look at this. Not sure if this is indeed what you want or if you
> > actually have to unproject them.
> >
> > http://www.mail-archive.com/r-sig-geo@stat.math.ethz.ch/
> msg04715.html
> >
> > require(ggplot2)
> > fortify(br)
> >
> >
> > Nikhil Kaza
> > Asst. Professor,
> > City and Regional Planning
> > University of North Carolina
> >
> > nikhil.list_at_gmail.com
> >
> > On Jun 9, 2010, at 2:45 PM, Thiago Veloso wrote:
> >
> > > Dear R colleagues,
> > > Does anyone know if it's possible to create a vector with
> > coordinate values extracted from a shape loaded with readShapePoly
> > command of "maptools" package?
> > > For example, the following code loads the shapefile containing
> > Brazilian states division:
> > > library(maptools)br<-readShapePoly("BR-map/3.shp")
> > > What I need to do is create a vector which contains all lat and
> > lon values inside this shapefile...
> > > Thanks in advance,
> > > Thiago Veloso.
> > >
> > >
> > >
> > > [[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
> >
> >
>
>
> [[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
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Jun 2010 - 20:22:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 20:30:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive