[R] Extract the coordinates of a Polylines
javad bayat
j@b@y@t194 @end|ng |rom gm@||@com
Wed Jan 30 16:12:08 CET 2019
Dear all;
Back to my previous question, I am trying to add X and Y coordinates to
every row of the data.
topo =
readOGR("E:/New/Modelling_Water/MIKE/BathyMetry/GIS_Armator/Chitgar_Topo.shp")#Read
shape file of the topo as polylines
plot(topo)
cords = topo using lines[[1]]@Lines[[1]]@coords###Extracting X and Y coordinates
of the polylines of topo
head(topo using data)
FID_ Entity Layer Color Linetype Elevation
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.0
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.5
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.5
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.5
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.5
0 LWPolyline C-TOPO-MAJR 9 Continuous 1258.5
How can I do this.
Sincerely.
On Sat, Jan 26, 2019 at 9:37 AM javad bayat <j.bayat194 using gmail.com> wrote:
> Dear R users;
> I am trying to extract the X and Y coordinates of a polylines along with
> Elevation data. I have extracted the Elevations as Z, but I do not know how
> to extract the X and Y of these Elevations. Is it possible to extract X and
> Y of the Elevation and create a data frame with three variables?
>
> line = readOGR("E:/......../Topo.shp")
> Z = line using data$Elevation
>
> Sincerely.
>
> --
> Best Regards
> Javad Bayat
> M.Sc. Environment Engineering
> Alternative Mail: bayat194 using yahoo.com
>
--
Best Regards
Javad Bayat
M.Sc. Environment Engineering
Alternative Mail: bayat194 using yahoo.com
[[alternative HTML version deleted]]
More information about the R-help
mailing list