[pdal] [EXTERNAL] Re: PDAL and OpenLayers

Howard Butler howard at hobu.co
Thu Dec 26 20:15:14 PST 2013


Note that points2grid came from the OpenTopography project, and CRREL's repository is one where we've cleaned things up a little bit and made it easy to integrate into PDAL.

Howard

On Dec 26, 2013, at 8:34 AM, Smith, Michael ERDC-RDE-CRREL-NH <Michael.Smith at erdc.dren.mil> wrote:

> Roger,
> 
> 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  https://github.com/CRREL/points2grid
> 
> Mike
> 
> -- 
> Michael Smith
> US Army Corps
> Remote Sensing GIS/Center
> 
> From: Roger Bedell <rbedell at coordinatesolutions.com>
> Date: Thursday, December 26, 2013 at 9:26 AM
> To: Michael Smith <michael.smith at erdc.dren.mil>
> Cc: Eran Nevo <eran at utilis.co.il>, "pdal at lists.osgeo.org" <pdal at lists.osgeo.org>
> Subject: Re: [EXTERNAL] Re: [pdal] PDAL and OpenLayers
> 
> Thanks Michael!
> 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.
> 
> The way I would do this is:
> 
> In OpenLayers, set up a WMS layer that calls a special tile URL handler on your server.
> 
> On the server, respond to the tile request by outputting the tile area from a pgPointCloud database directly into a DEM using pdal pipeline mypipelinefile.xml
> then do the rest as you suggest.
> gdal_translate -a_srs epsg:3857 points2grid.asc points2grid.tif
> gdaldem hillshade points2grid.tif points2grid_hs.tif -z 5 -az 90
> 
> 
> Return the tile response to OpenLayers as a jpeg or png.
> 
> 
> Roger
> 
> 
> On Thu, Dec 26, 2013 at 1:28 PM, Smith, Michael ERDC-RDE-CRREL-NH <Michael.Smith at erdc.dren.mil> wrote:
> Roger and Eran,
> 
> 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.
> 
> 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.
> 
> pdal pipeline point2gridpipe.xml
> gdal_translate -a_srs epsg:3857 points2grid.asc points2grid.tif
> gdaldem hillshade points2grid.tif points2grid_hs.tif -z 5 -az 90
> gdaldem color-relief points2grid.tif colorramp.txt points2grid_cr.tif -co compress=jpeg -co PHOTOMETRIC=YCBCR -co tiled=yes
> 
> Example pipeline:
> 
> <?xml version="1.0"?>
> <Pipeline version="1.0">
>   <Writer type="drivers.p2g.writer">
>     <Option name="filename”>points2grid</Option>
>     <Option name="grid_dist_x">1</Option>
>     <Option name="grid_dist_y">1</Option>
>     <Option name="output_type">idw</Option>
>     <Option name="output_format">asc</Option>
>     <Filter type="filters.selector">
>       <Option name="ignore_default">true</Option>
>       <Option name="keep">
>         <Options>
>           <Option name="dimension">X</Option>
>           <Option name="dimension">Y</Option>
>           <Option name="dimension">Z</Option>
>         </Options>
>       </Option>
>       <Filter type="filters.inplacereprojection">
>         <Option name="out_srs">EPSG:3857</Option>
>         <Option name="scale_x">1e-05</Option>
>         <Option name="scale_z">1e-05</Option>
>         <Option name="scale_y">1e-05</Option>
>         <Reader type="drivers.las.reader">
>           <Option name="spatialreference">epsg:26911+4326</Option>
>           <Option name="filename">pointcloudfile.laz</Option>
>         </Reader>
>       </Filter>
>     </Filter>
>   </Writer>
> </Pipeline>
> 
> 
> -- 
> Michael Smith
> US Army Corps
> Remote Sensing GIS/Center
> 
> From: Roger Bedell <rbedell at coordinatesolutions.com>
> Date: Thursday, December 26, 2013 at 5:15 AM
> To: Eran Nevo <eran at utilis.co.il>
> Cc: "pdal at lists.osgeo.org" <pdal at lists.osgeo.org>
> Subject: [EXTERNAL] Re: [pdal] PDAL and OpenLayers
> Resent-From: Michael Smith <michael.smith at usace.army.mil>
> 
> Hello Eran,
> 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...
> 
> 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.
> 
> http://rasternormalizer.codeplex.com/
> 
> Here is the result:
> 
> 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
> 
> Roger
> 
> 
> 
> 
> 
> On Wed, Nov 13, 2013 at 5:20 AM, Eran Nevo <eran at utilis.co.il> wrote:
> Yes , it must be run through browser
> 
> On 13 בנוב 2013, at 03:10, Chris Foster <chris.foster at roames.com.au> wrote:
> 
>> Does it need to run in a browser?  If not, I've been working on a
>> desktop-based lidar point cloud viewer which might help you out - see
>> http://c42f.github.io/displaz.  I'm close to a 0.2 release which will
>> include a binary installer for windows.
>> 
>> Cheers,
>> ~Chris
>> 
>> On 13 November 2013 01:26, Eran Nevo <eran at utilis.co.il> wrote:
>>> I'm looking for some kind of lidar viewer
>>> 
>>> On 12 בנוב 2013, at 17:15, "Michael P. Gerlek" <mpg at flaxen.com> wrote:
>>> 
>>> Eran-
>>> 
>>> The sheer volume of point cloud data, as Howard says, makes it very hard to
>>> display in a traditional web browser system, e.g. OpenLayers fed by JSON.
>>> You'll need to find a way to reduce the point count in a smart way - like
>>> feeding out a LOD (level of detail) algorithm.
>>> 
>>> Two or three years ago, people started looking for good ways to do this.
>>> There might be an open source solution by now, but it would require
>>> something more heavyweight than just OpenLayers.
>>> 
>>> _mpg
>>> 
>>> On Nov 12, 2013, at 7:06 AM, Eran Nevo <eran at utilis.co.il> wrote:
>>> 
>>> Oh , I'm looking for open source solution to show lidar on web application
>>> 
>>> On 12 בנוב 2013, at 16:40, Howard Butler <howard at hobu.co> wrote:
>>> 
>>> 
>>> On Nov 11, 2013, at 12:21 PM, Eran Nevo <eran at utilis.co.il> wrote:
>>> 
>>> 
>>> 
>>> Hi there ,
>>> 
>>> Can anyone point me to an example how to implement PDAL with OpenLayers ?
>>> 
>>> I have LAS file and PostGIS db with points in them.
>>> 
>>> Want to try PDAL.
>>> 
>>> 
>>> OpenLayers is a web JavaScript technology. PDAL is a data translation
>>> software focused on transformations from one format to another. You could
>>> try using PDAL to export point cloud data to GeoJSON (using
>>> drivers.text.writer) and importing that into an OpenLayers map in some way.
>>> You are very likely to overwhelm any browser, however, with any significant
>>> amount of point cloud data.
>>> 
>>> Howard
>>> 
>>> _______________________________________________
>>> pdal mailing list
>>> pdal at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pdal
>>> 
>>> 
>>> _______________________________________________
>>> pdal mailing list
>>> pdal at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pdal
> 
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal
> 
> 
> 
> -- 
> Roger Bedell
> Coordinate Solutions Inc.
> 
> 
> 
> -- 
> Roger Bedell
> Coordinate Solutions Inc.
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20131226/65de8cce/attachment.pgp>


More information about the pdal mailing list