[R-sig-Geo] problem extracting Z value from line shapefile
zbynek.janoska at centrum.cz
zbynek.janoska at centrum.cz
Wed Jul 25 09:22:00 CEST 2012
Hello,
I have following problem:
I wish to extract z coordinates from a polyline shapefile. Using readOGR() i
get following:
> data <- readOGR(path,'tesikov')
OGR data source with driver: ESRI Shapefile
Source: "C:/Users/Janoska/Documents/GPS", layer: "tesikov"
with 1 features and 1 fields
Feature type: wkbLineString with 3 dimensions
Warning message:
In readOGR("C:/Users/Janoska/Documents/GPS", "tesikov") :
Z-dimension discarded
Clearly, Z dimension is stored in the data, but readOGR does not read it.
Hence, I followed this post:
https://stat.ethz.ch/pipermail/r-sig-geo/2007-March/001847.html
data <- coordinates(readShapeLines('path/tesikov.shp'))
> str(data)
List of 1
$ :List of 1
..$ : num [1:335, 1:2] -540376 -540369 -540361 -540353 -540344 ...
Resulting coordinates have only two dimensions.
I am wondering, whether Z dimension can be extracted only from points?
Any suggestion would be appreciated.
Thanks,
Zbynek
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/problem-extracting-Z-value-from-line-shapefile-tp7580600.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list