[R] Linestring values to vector

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Fri Oct 21 20:01:29 CEST 2022


As the Posting Guide would have warned you, you will probably have better luck asking this kind of question on the R-sig-geo mailing list.

On October 21, 2022 10:45:30 AM PDT, Nick Wray <nickmwray using gmail.com> wrote:
>Hello I have downloaded a large shapefile dataset of UK rivers and I want
>to isolate (as an ordinary R string) the LINESTRING values for particular
>lines, corresponding to rivers
>Looking at the first line I can isolate the geometry by
>
>Hello I have downloaded a large shapefile dataset of UK rivers and I want
>to isolate (as an ordinary R string) the LINESTRING values for particular
>lines, corresponding to rivers
>
>Looking at the first line I can isolate the geometry by
>
>
>
>st_geometry(rivers[1,8])
>
>
>
>Geometry set for 1 feature
>Geometry type: LINESTRING
>Dimension:     XYZ
>Bounding box:  xmin: 462010.6 ymin: 1213039 xmax: 462306.5 ymax: 1213199
>z_range:       zmin: 0 zmax: 0
>Projected CRS: OSGB 1936 / British National Grid
>
>LINESTRING Z (462306.5 1213048 0, 462275.4 1213...
>
>
>What I need is all the values in the LINESTRING as a common or garden R
>vector, but I cannot find a way to do this.
>
> Does anyone know how?  Thanks, Nick Wray
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list