<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
hey,<br>
<br>
you can also calculate a normalized point cloud by subtract Z(from
point) from the DTM(Z) <br>
<br>
you need a DTM (as raster) and the LiDAR points as ASCII<br>
<br>
<br>
1. "r.stats -gn in=DTM >temp_elev"<br>
2. create a dictionary in python, from "temp_elev" k=x,y and value=z
(x and y should INT)<br>
3. loop the point cloud and subtract the z from k for each LiDAR
point and add a nZ column >> nDTM_LiDAR_points <br>
<br>
2 and 3 should run in the same script!<br>
<br>
e.g. In Python:<br>
<br>
#read input raster data (ascii from r.stats -gn DTM)<br>
for lineR in iR.readlines():<br>
valR = lineR.strip().split(' ')<br>
x = float(valR[0])<br>
y = float(valR[1])<br>
k = ('%s %s' % (int(x),int(y)))<br>
z = float(valR[2])<br>
value.append(z)<br>
D[k] = value<br>
value = []<br>
<br>
#read input point cloud as ascii and caclate nZ<br>
for lineP in iP.readlines():<br>
valP = lineP.strip().split(' ')<br>
x = float(valP[0])<br>
y = float(valP[1])<br>
k = ('%s %s' % (int(x),int(y)))<br>
Z = float(valP[2])<br>
output.write('%s %s %s %s\n' %(x,y,Z,Z-D[k][0]))<br>
oF.write(output.getvalue())<br>
<br>
then you can 'awk' the data you are interested in 'cat
nDTM_LiDAR_points | awk '{if($4 < 2 && $4 > 1) print
$0}' >LiDAR_1_to_2<br>
<br>
r.in.xyz LiDAR_1_to_2 out=LiDAR_1_to_2 method=n<br>
<br>
you can see the related reference to a similar workflow:<br>
<a class="moz-txt-link-freetext" href="http://www.isprs.org/proceedings/XXXVIII/5-W12/Papers/ls2011_submission_35.pdf">http://www.isprs.org/proceedings/XXXVIII/5-W12/Papers/ls2011_submission_35.pdf</a><br>
<br>
Michael<br>
<br>
Am 2012-03-30 14:52, schrieb Daniel Lee:
<blockquote
cite="mid:CAJHDHfqx=K7Wnc=DYmkYQZKUnW0EKEL2WfenbBXh7cgs_fFhJA@mail.gmail.com"
type="cite">Hi Daniel V ;)<br>
<br>
You're right, that might not be the best way to go. I thought that
it might simply be faster to do a topological operation rather
than a DB edit. To be honest, I'd stay away from any 3D objects
like volumes because it'd just get pretty complicated if you use
them... As far as I know ;) Could be wrong. My suggestion would
use the following steps:<br>
<br>
1. Make terrain raster<br>
2. Make surface raster<br>
-- Here I'm assuming that for you basically have only two height
"layers" - i.e. no points that contain information between the
surface raster and terrain (like bushes beneath a tree cover).<br>
3. Make a relative digital surface model (rDSM) (r.mapcalc -->
rDSM = surface - terrain)<br>
4. Reclassify the rDSM into the different classes you're
interested in<br>
5. Convert the reclassified raster into an area vector file.<br>
-- This makes a 2D map of polygons that cover the same areas as
the raster classes.<br>
6. Extract the points inside the different different height
classes (v.select)<br>
<br>
However, if you're working with regularly spaced points that pass
onto a regular grid (=1 pt. / raster pixel) you could always use
r.stats to tell you how much area is in each raster category. Then
you really wouldn't need vectors at all.<br>
<br>
Daniel L.<br clear="all">
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span
style="font-size:13px;font-family:arial,sans-serif"></span></p>
<p>--<br>
</p>
<p>B.Sc. Daniel Lee<br>
Geschäftsführung für Forschung und Entwicklung<br>
ISIS - International Solar Information Solutions GbR<br>
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder<br>
</p>
<p>Deutschhausstr. 10<br>
35037 Marburg<br>
Festnetz: <a moz-do-not-send="true" value="+4964213796256"
style="color:rgb(28,81,168)">+49 6421 379 6256</a><br>
Mobil: <a moz-do-not-send="true" value="+4917661277269"
style="color:rgb(28,81,168)">+49 176 6127 7269</a><br>
E-Mail: <a moz-do-not-send="true"
href="mailto:Lee@isi-solutions.org"
style="color:rgb(28,81,168)" target="_blank">Lee@isi-solutions.org</a><br>
Web: <a moz-do-not-send="true"
href="http://www.isi-solutions.org/"
style="color:rgb(28,81,168)" target="_blank">http://www.isi-solutions.org</a></p>
<p>ISIS wird gefördert durch die Bundesrepublik Deutschland,
Zuwendungsgeber: Bundesministerium für Wirtschaft und
Technologie aufgrund eines Beschlusses des Deutschen
Bundestages, sowie durch die Europäische Union, Zuwendungsgeber:
Europäischer Sozialfonds.<br>
Zusätzliche Unterstützung erhält ISIS von dem Entrepreneurship
Cluster Mittelhessen, der Universität Marburg, dem Laboratory
for Climatology and Remote Sensing und dem GIS-Lab Marburg.</p>
<br>
<br>
<br>
<div class="gmail_quote">Am 30. März 2012 14:09 schrieb Daniel
Victoria <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Daniel Lee (two Daniels changing emails is a hard thing to
follow...)<br>
<br>
I can create the different height classes raster easily but
I'm not<br>
sure how to get the lidar points from the cloud that are in
each<br>
vertical slice.<br>
<br>
Maybe work with raster volumes? Is there a way to cross points
at<br>
different volumes?<br>
<br>
The fact is, I'm not seeing how to do this without having to
import<br>
the lidar point cloud.<br>
<br>
Schematically, what I want to do is count the number of points
that<br>
are in the vertical bins 1 2, (g is ground), a vertical
slice...<br>
___<br>
| . :<br>
bin 2 | :<br>
| .<br>
-----<br>
bin 1 | ...<br>
| .<br>
ggggg<br>
<br>
Cheers and many thanks for the attention<br>
Daniel V<br>
<div>
<div><br>
<br>
On Fri, Mar 30, 2012 at 8:08 AM, Daniel Lee <<a
moz-do-not-send="true"
href="mailto:lee@isi-solutions.org" target="_blank">lee@isi-solutions.org</a>>
wrote:<br>
> Hi Daniel,<br>
><br>
> You could try making different rasters with classes
(0-5m over ground, 5-10m<br>
> over ground, etc.) and then convert them into
polygons, then check how many<br>
> points are inside them. I'm not sure if it'd be
faster than the way you<br>
> suggested originally, though, when you think that
you'd have to make the<br>
> rasters first, etc.<br>
><br>
> I ended up giving up on large vector operations with
LiDAR point clouds in<br>
> GRASS 6.4 because it simply took way too long, but I
was dealing with<br>
> millions of points. For such a small dataset it's
probably fine, since as<br>
> long as you know your script is okay you can let it
run through your lunch<br>
> break ;)<br>
><br>
><br>
> Daniel<br>
><br>
> --<br>
><br>
> B.Sc. Daniel Lee<br>
> Geschäftsführung für Forschung und Entwicklung<br>
> ISIS - International Solar Information Solutions GbR<br>
> Vertreten durch: Daniel Lee, Nepomuk Reinhard und
Nils Räder<br>
><br>
> Deutschhausstr. 10<br>
> 35037 Marburg<br>
> Festnetz: <a moz-do-not-send="true"
href="tel:%2B49%206421%20379%206256"
value="+4964213796256" target="_blank">+49 6421 379 6256</a><br>
> Mobil: <a moz-do-not-send="true"
href="tel:%2B49%20176%206127%207269"
value="+4917661277269" target="_blank">+49 176 6127 7269</a><br>
> E-Mail: <a moz-do-not-send="true"
href="mailto:Lee@isi-solutions.org" target="_blank">Lee@isi-solutions.org</a><br>
> Web: <a moz-do-not-send="true"
href="http://www.isi-solutions.org" target="_blank">http://www.isi-solutions.org</a><br>
><br>
> ISIS wird gefördert durch die Bundesrepublik
Deutschland, Zuwendungsgeber:<br>
> Bundesministerium für Wirtschaft und Technologie
aufgrund eines Beschlusses<br>
> des Deutschen Bundestages, sowie durch die
Europäische Union,<br>
> Zuwendungsgeber: Europäischer Sozialfonds.<br>
> Zusätzliche Unterstützung erhält ISIS von dem
Entrepreneurship Cluster<br>
> Mittelhessen, der Universität Marburg, dem Laboratory
for Climatology and<br>
> Remote Sensing und dem GIS-Lab Marburg.<br>
><br>
><br>
><br>
><br>
> Am 30. März 2012 13:00 schrieb Daniel Victoria <<a
moz-do-not-send="true"
href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>>:<br>
><br>
>> I need to calculate the number of points at
different height levels. That<br>
>> is, how many points are from 0 to 5 meters? And
from 5 to 10? And so on. So<br>
>> I believe I need to work with vector points and a
database. Or is there<br>
>> another way?<br>
>> Thanks<br>
>> Daniel<br>
>><br>
>> On Mar 30, 2012 6:47 AM, "Daniel Lee" <<a
moz-do-not-send="true"
href="mailto:lee@isi-solutions.org" target="_blank">lee@isi-solutions.org</a>>
wrote:<br>
>>><br>
>>> Hi there,<br>
>>><br>
>>> I don't work too much with vectors, but my
personal experience with them<br>
>>> has been fairly slow, perhaps due to the
topology. If you have access to the<br>
>>> raw point cloud, you could try importing the
ground and surface points as<br>
>>> separate rasters using r.in.xyz and then use
r.mapcalc to get the height by<br>
>>> subtracting the ground from the surface
raster. Or do you definitely need<br>
>>> vector points as an output?<br>
>>><br>
>>> Best,<br>
>>> Daniel<br>
>>><br>
>>> --<br>
>>><br>
>>> B.Sc. Daniel Lee<br>
>>> Geschäftsführung für Forschung und
Entwicklung<br>
>>> ISIS - International Solar Information
Solutions GbR<br>
>>> Vertreten durch: Daniel Lee, Nepomuk Reinhard
und Nils Räder<br>
>>><br>
>>> Deutschhausstr. 10<br>
>>> 35037 Marburg<br>
>>> Festnetz: <a moz-do-not-send="true"
href="tel:%2B49%206421%20379%206256"
value="+4964213796256" target="_blank">+49 6421 379 6256</a><br>
>>> Mobil: <a moz-do-not-send="true"
href="tel:%2B49%20176%206127%207269"
value="+4917661277269" target="_blank">+49 176 6127 7269</a><br>
>>> E-Mail: <a moz-do-not-send="true"
href="mailto:Lee@isi-solutions.org" target="_blank">Lee@isi-solutions.org</a><br>
>>> Web: <a moz-do-not-send="true"
href="http://www.isi-solutions.org" target="_blank">http://www.isi-solutions.org</a><br>
>>><br>
>>> ISIS wird gefördert durch die Bundesrepublik
Deutschland,<br>
>>> Zuwendungsgeber: Bundesministerium für
Wirtschaft und Technologie aufgrund<br>
>>> eines Beschlusses des Deutschen Bundestages,
sowie durch die Europäische<br>
>>> Union, Zuwendungsgeber: Europäischer
Sozialfonds.<br>
>>> Zusätzliche Unterstützung erhält ISIS von dem
Entrepreneurship Cluster<br>
>>> Mittelhessen, der Universität Marburg, dem
Laboratory for Climatology and<br>
>>> Remote Sensing und dem GIS-Lab Marburg.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Am 29. März 2012 22:59 schrieb Daniel
Victoria<br>
>>> <<a moz-do-not-send="true"
href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>>:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> I'm trying to calculate the height from
the ground of several lidar<br>
>>>> points (15million) in order to get the
number of points that occur at<br>
>>>> different height levels. I read some
older posts about using r.in.xyz<br>
>>>> (or r.in.lidar in grass 7) but I could
not understand how to count the<br>
>>>> number or points that have height from 0
to 5 m above the ground, for<br>
>>>> instance. So, I'm trying to do the
following.<br>
>>>><br>
>>>> 1) import points using v.in.lidar (Grass
7 ubuntu linux)<br>
>>>> 2) create a column in the database for
the ground height and one for<br>
>>>> elevation<br>
>>>> 3) populate height column from ground
raster (generate in another<br>
>>>> process) using v.what.rast<br>
>>>> 4) calculate elevation as zcoord - ground
for each point (v.db.update)<br>
>>>><br>
>>>> As you might imagine, this takes a long
time. Just to import a 400Mb<br>
>>>> lidar file takes around 50min.<br>
>>>> Is there any easier way that I'm not
envisioning?<br>
>>>><br>
>>>> I'm running Grass 7 with liblas on a
Ubuntu Virtual Machine and sqlite<br>
>>>> backend.<br>
>>>><br>
>>>> Thanks<br>
>>>> Daniel<br>
>>>>
_______________________________________________<br>
>>>> grass-user mailing list<br>
>>>> <a moz-do-not-send="true"
href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
>>>> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/grass-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
>>><br>
>>><br>
><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Mag. Michael Vetter
Institute of Photogrammetry and Remote Sensing (I.P.F.)
Vienna University of Technology (TU Wien)
Gusshausstrasse 27-29, 1040 Vienna, Austria
Centre for Water Resource Systems (CWRS)
Vienna University of Technology (TU Wien)
Karlsplatz 13/222, A-1040 Vienna, Austria
Tel: +43-(0)1-58801-22226
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:mv@ipf.tuwien.ac.at">mv@ipf.tuwien.ac.at</a>
<a class="moz-txt-link-abbreviated" href="http://www.ipf.tuwien.ac.at">www.ipf.tuwien.ac.at</a>
<a class="moz-txt-link-abbreviated" href="http://www.waterresources.at">www.waterresources.at</a>
</pre>
</body>
</html>