[R-sig-Geo] Substracting DTM from Terrestrial LiDAR point cloud
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Wed Oct 10 17:31:43 CEST 2012
On 10/10/2012 06:00 PM, Nathalie Morin wrote:
> Hello !
>
>
>
> I am working with georeferenced LiDAR data with R and sp. I am trying to
> normalize height and remove the slope effect from a Terrestrial Laser
> Scanner (TLS) point cloud.
>
> The available data is :
>
> - a TLS point cloud in ASCII format converted to sp objet of class
> SpatialPoint (variable named "tls.z.sp")
>
> - a raster DTM in TIF format (1 m resolution) converted to sp
> object of class SpatialGridDataFrame (variable named "tls.dtm$z")
>
>
>
> The method consists in subtracting the DTM z value from each TLS point z
> value. I proceeded to some tests with the "over()" function with :
Where is your TLS z value? If tls.z.sp is a 3D SpatialPoints object, I'd
suggest to make it a 2D object with z as the attribute value, meaning it
is a SpatialPointsDataFrame object.
>
> x = "SpatialPoints"
>
> y = "SpatialGridDataFrame"
>
>
>
> nz <- over(tls.z.sp, tls.dtm$z, tls.z.sp-tls.dtm$z)
Hard to see, but maybe:
nz = over(tls.z.sp, tls.dtm)
then, if tls.z.sp is a SpatialPointsDataFrame with z as attribute:
tls.z.sp$z - nz$z
gives you the differences you want, and
tls.z.sp$difference = tls.z.sp$z - nz$z
adds them as a variable to the SpatialPointsDataFrame oject.
>
>
>
> I am not sure to be on the right track. Any suggestion would be very much
> appreciated !
>
>
>
> Cheers,
>
> Nathalie
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list