<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Roger,</div>
<div><br>
</div>
<div>Note that Points2Grid is a separate compile option in PDAL, although it is easy to compile in option. It uses CMAKE for building. The repo for the code is here  <a href="https://github.com/CRREL/points2grid">https://github.com/CRREL/points2grid</a></div>
<div><br>
</div>
<div>Mike</div>
<div><br>
</div>
<div>
<div>
<div>
<div>-- </div>
<div>Michael Smith</div>
</div>
<div>US Army Corps</div>
<div>Remote Sensing GIS/Center</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Roger Bedell <<a href="mailto:rbedell@coordinatesolutions.com">rbedell@coordinatesolutions.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, December 26, 2013 at 9:26 AM<br>
<span style="font-weight:bold">To: </span>Michael Smith <<a href="mailto:michael.smith@erdc.dren.mil">michael.smith@erdc.dren.mil</a>><br>
<span style="font-weight:bold">Cc: </span>Eran Nevo <<a href="mailto:eran@utilis.co.il">eran@utilis.co.il</a>>, "<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a>" <<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [EXTERNAL] Re: [pdal] PDAL and OpenLayers<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Thanks Michael!
<div>I didn't even know this existed! Awesome. So, back to the original question, it should be therefore possible to put together a simple OpenLayers hillshade or colormap visualizer for a pgPointCloud database using the chain you suggest and display directly
 in OpenLayers. Then you wouldn't even need GeoServer. It might be kind of slow however.</div>
<div><br>
</div>
<div>The way I would do this is:</div>
<div><br>
</div>
<div>In OpenLayers, set up a WMS layer that calls a special tile URL handler on your server.</div>
<div><br>
</div>
<div>On the server, respond to the tile request by outputting the tile area from a pgPointCloud database directly into a DEM using <span style="font-family: Calibri, sans-serif; font-size: 14px;">pdal pipeline mypipelinefile.xml</span><br>
</div>
<div><span style="font-family: Calibri, sans-serif; font-size: 14px;">then do the rest as you suggest.</span></div>
<div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="Calibri,sans-serif">gdal_translate -a_srs epsg:3857 points2grid.asc points2grid.tif</font></div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="Calibri,sans-serif">
<div>gdaldem hillshade points2grid.tif points2grid_hs.tif -z 5 -az 90</div>
<div><br>
</div>
<div><br>
</div>
<div>Return the tile response to OpenLayers as a jpeg or png.</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="font-family:arial;font-size:small">Roger</span><br>
</div>
</font></div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Dec 26, 2013 at 1:28 PM, Smith, Michael ERDC-RDE-CRREL-NH
<span dir="ltr"><<a href="mailto:Michael.Smith@erdc.dren.mil" target="_blank">Michael.Smith@erdc.dren.mil</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div style="font-size:14px;font-family:Calibri,sans-serif">Roger and Eran,</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif">To create a DEM from Pointcloud data using PDAL, you can use the Points2Grid driver. Here’s an example pipeline. You might also want add a filter to select just the last return or the Bare Earth classification
 if your data is classified.</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif">For pdal, first create an ascii grid file from (las/pgpointcloud/whatever) using pdal. Then convert to tif via gdal_translate. Then use gdaldem to create the hillshade and color-relief images.</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif">pdal pipeline point2gridpipe.xml</div>
<div><font face="Calibri,sans-serif">gdal_translate -a_srs epsg:3857 points2grid.asc points2grid.tif</font></div>
<div><font face="Calibri,sans-serif">
<div>gdaldem hillshade points2grid.tif points2grid_hs.tif -z 5 -az 90</div>
<div>
<div>gdaldem color-relief points2grid.tif colorramp.txt points2grid_cr.tif -co compress=jpeg -co PHOTOMETRIC=YCBCR -co tiled=yes</div>
</div>
<div><br>
</div>
</font></div>
<div style="font-size:14px;font-family:Calibri,sans-serif">Example pipeline:</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif">
<div><?xml version="1.0"?></div>
<div><Pipeline version="1.0"></div>
<div>  <Writer type="drivers.p2g.writer"></div>
<div>    <Option name="filename”>points2grid</Option></div>
<div>    <Option name="grid_dist_x">1</Option></div>
<div>    <Option name="grid_dist_y">1</Option></div>
<div>    <Option name="output_type">idw</Option></div>
<div>    <Option name="output_format">asc</Option></div>
<div>    <Filter type="filters.selector"></div>
<div>      <Option name="ignore_default">true</Option></div>
<div>      <Option name="keep"></div>
<div>        <Options></div>
<div>          <Option name="dimension">X</Option></div>
<div>          <Option name="dimension">Y</Option></div>
<div>          <Option name="dimension">Z</Option></div>
<div>        </Options></div>
<div>      </Option></div>
<div>      <Filter type="filters.inplacereprojection"></div>
<div>        <Option name="out_srs">EPSG:3857</Option></div>
<div>        <Option name="scale_x">1e-05</Option></div>
<div>        <Option name="scale_z">1e-05</Option></div>
<div>        <Option name="scale_y">1e-05</Option></div>
<div>        <Reader type="drivers.las.reader"></div>
<div>          <Option name="spatialreference">epsg:26911+4326</Option></div>
<div>          <Option name="filename">pointcloudfile.laz</Option></div>
<div>        </Reader></div>
<div>      </Filter></div>
<div>    </Filter></div>
<div>  </Writer></div>
<div></Pipeline></div>
<span class="HOEnZb"><font color="#888888"></font></span></div>
<span class="HOEnZb"><font color="#888888">
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>-- </div>
<div>Michael Smith</div>
</div>
<div>US Army Corps</div>
<div>Remote Sensing GIS/Center</div>
</div>
</div>
<div style="font-size:14px;font-family:Calibri,sans-serif"><br>
</div>
</font></span><span style="font-size: 14px; font-family: Calibri, sans-serif;"><span class="HOEnZb"><font color="#888888">
<div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span>Roger Bedell <<a href="mailto:rbedell@coordinatesolutions.com" target="_blank">rbedell@coordinatesolutions.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, December 26, 2013 at 5:15 AM<br>
<span style="font-weight:bold">To: </span>Eran Nevo <<a href="mailto:eran@utilis.co.il" target="_blank">eran@utilis.co.il</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a>" <<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [pdal] PDAL and OpenLayers<br>
<span style="font-weight:bold">Resent-From: </span>Michael Smith <<a href="mailto:michael.smith@usace.army.mil" target="_blank">michael.smith@usace.army.mil</a>><br>
</div>
</font></span>
<div>
<div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hello Eran,
<div>Another possibility is to create DEM files from the LIDAR data, then use GDALDEM to create hillshaded tiles. I'm not exactly clear how to create the DEM files however...</div>
<div><br>
</div>
<div>One you have DEM files, I wrote a tool that can create a seamless hillshaded layer for GeoServer, then it is served up to OpenLayers the usual way via GeoServer.</div>
<div><br>
</div>
<div><a href="http://rasternormalizer.codeplex.com/" target="_blank">http://rasternormalizer.codeplex.com/</a><br>
</div>
<div><br>
</div>
<div>Here is the result:</div>
<div><br>
</div>
<div><a href="http://204.62.18.181/OGI/search.aspx?mapcenterlon=-97.670532226558&mapcenterlat=34.802782432797&mapscale=11&Layers=58d1fa5c-6eb4-4b95-9f42-69cd7277e15d%2C4b945341-bc66-4c09-9df4-26fbb58e4a5b%2C&maptype=OLMap" target="_blank">http://204.62.18.181/OGI/search.aspx?mapcenterlon=-97.670532226558&mapcenterlat=34.802782432797&mapscale=11&Layers=58d1fa5c-6eb4-4b95-9f42-69cd7277e15d%2C4b945341-bc66-4c09-9df4-26fbb58e4a5b%2C&maptype=OLMap</a><br>
</div>
<div><br>
</div>
<div>Roger</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Nov 13, 2013 at 5:20 AM, Eran Nevo <span dir="ltr">
<<a href="mailto:eran@utilis.co.il" target="_blank">eran@utilis.co.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">
<div style="direction:ltr">Yes , it must be run through browser</div>
<div>
<div>
<div><br>
On 13 בנוב 2013, at 03:10, Chris Foster <<a href="mailto:chris.foster@roames.com.au" target="_blank">chris.foster@roames.com.au</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div><span>Does it need to run in a browser?  If not, I've been working on a</span><br>
<span>desktop-based lidar point cloud viewer which might help you out - see</span><br>
<span><a href="http://c42f.github.io/displaz" target="_blank">http://c42f.github.io/displaz</a>.  I'm close to a 0.2 release which will</span><br>
<span>include a binary installer for windows.</span><br>
<span></span><br>
<span>Cheers,</span><br>
<span>~Chris</span><br>
<span></span><br>
<span>On 13 November 2013 01:26, Eran Nevo <<a href="mailto:eran@utilis.co.il" target="_blank">eran@utilis.co.il</a>> wrote:</span><br>
<blockquote type="cite"><span>I'm looking for some kind of lidar viewer</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>On 12 בנוב 2013, at 17:15, "Michael P. Gerlek" <<a href="mailto:mpg@flaxen.com" target="_blank">mpg@flaxen.com</a>> wrote:</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Eran-</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>The sheer volume of point cloud data, as Howard says, makes it very hard to</span><br>
</blockquote>
<blockquote type="cite"><span>display in a traditional web browser system, e.g. OpenLayers fed by JSON.</span><br>
</blockquote>
<blockquote type="cite"><span>You'll need to find a way to reduce the point count in a smart way - like</span><br>
</blockquote>
<blockquote type="cite"><span>feeding out a LOD (level of detail) algorithm.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Two or three years ago, people started looking for good ways to do this.</span><br>
</blockquote>
<blockquote type="cite"><span>There might be an open source solution by now, but it would require</span><br>
</blockquote>
<blockquote type="cite"><span>something more heavyweight than just OpenLayers.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>_mpg</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>On Nov 12, 2013, at 7:06 AM, Eran Nevo <<a href="mailto:eran@utilis.co.il" target="_blank">eran@utilis.co.il</a>> wrote:</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Oh , I'm looking for open source solution to show lidar on web application</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>On 12 בנוב 2013, at 16:40, Howard Butler <<a href="mailto:howard@hobu.co" target="_blank">howard@hobu.co</a>> wrote:</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>On Nov 11, 2013, at 12:21 PM, Eran Nevo <<a href="mailto:eran@utilis.co.il" target="_blank">eran@utilis.co.il</a>> wrote:</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Hi there ,</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Can anyone point me to an example how to implement PDAL with OpenLayers ?</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>I have LAS file and PostGIS db with points in them.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Want to try PDAL.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>OpenLayers is a web JavaScript technology. PDAL is a data translation</span><br>
</blockquote>
<blockquote type="cite"><span>software focused on transformations from one format to another. You could</span><br>
</blockquote>
<blockquote type="cite"><span>try using PDAL to export point cloud data to GeoJSON (using</span><br>
</blockquote>
<blockquote type="cite"><span>drivers.text.writer) and importing that into an OpenLayers map in some way.</span><br>
</blockquote>
<blockquote type="cite"><span>You are very likely to overwhelm any browser, however, with any significant</span><br>
</blockquote>
<blockquote type="cite"><span>amount of point cloud data.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>Howard</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>_______________________________________________</span><br>
</blockquote>
<blockquote type="cite"><span>pdal mailing list</span><br>
</blockquote>
<blockquote type="cite"><span><a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a></span><br>
</blockquote>
<blockquote type="cite"><span><a href="http://lists.osgeo.org/mailman/listinfo/pdal" target="_blank">http://lists.osgeo.org/mailman/listinfo/pdal</a></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>_______________________________________________</span><br>
</blockquote>
<blockquote type="cite"><span>pdal mailing list</span><br>
</blockquote>
<blockquote type="cite"><span><a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a></span><br>
</blockquote>
<blockquote type="cite"><span><a href="http://lists.osgeo.org/mailman/listinfo/pdal" target="_blank">http://lists.osgeo.org/mailman/listinfo/pdal</a></span><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
<br>
_______________________________________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pdal" target="_blank">http://lists.osgeo.org/mailman/listinfo/pdal</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Roger Bedell<br>
Coordinate Solutions Inc.<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Roger Bedell<br>
Coordinate Solutions Inc.<br>
</div>
</div>
</div>
</span>
</body>
</html>