[R-sig-Geo] LINESTRING to vector in R
Edzer Pebesma
edzer@pebe@m@ @end|ng |rom un|-muen@ter@de
Sat Oct 22 18:52:05 CEST 2022
st_as_text(st_geometry(rivers[1,]))
On 22/10/2022 13:06, Nick Wray 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-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081
More information about the R-sig-Geo
mailing list