[pdal] coordinate precision pgpointcloud writer?

Paul Ramsey pramsey at cleverelephant.ca
Mon Nov 17 15:50:43 PST 2014


(a) you’ll want to use pc_get to actually get the coordinate value and confirm the precision, you might just be seeing a text output artifact as the json is written out
(b) you’ll want to check the pointcloud_formats entry for this pcid and see what the specified precision actually is
(c) looks like you’re storing far more precision than you actually need, if you reduced it appropriately, per what you see in those results (lots of 0’s after the 6th digit) you’ll save lots of space probably

P.

-- 
Paul Ramsey
http://cleverelephant.ca
http://postgis.net

On November 17, 2014 at 3:46:40 PM, Ashley Mort (ashley_c_mort at raytheon.com) wrote:

Can someone please help me figure out why I am losing coordinate  
precision when I use pdal's pgpoingcloud.writer to write into my  
Postgres DB?  

I have a .las file in epsg:4326 and when I put it though my pdal  
pipeline, I seem to lose precision (-122.1831470 will become -112.183)  
when I query for it.  

Below is a sample point from my .las file, the output I get from  
querying postgres, and the pipeline file that I used. Can anyone point  
out what I'm doing wrong? Thanks!  


postgres at ubuntu:/home/stack/Downloads$ pdal info st2-helens.las -p 5  
{  
"X": "-122.18314700000002",  
"Y": "46.238651000000004",  
"Z": "1161.8700000000001",  
"Intensity": "0",  
"ReturnNumber": "0",  
"NumberOfReturns": "0",  
"ScanDirectionFlag": "0",  
"EdgeOfFlightLine": "0",  
"Classification": "2",  
"ScanAngleRank": "0",  
"UserData": "0",  
"PointSourceId": "20",  
"Time": "0",  
"Red": "205",  
"Green": "205",  
"Blue": "185"  
}  

lidarimport=# select PC_AsText(PC_Explode(pa)) from sthelens4326 limit 10;  
pc_astext  
{"pcid":3,"pt":[-122.211,46.1886,1874.3,0,0,0,0,0,1,0,0,12,0,242,242,238,1.1605  
3e+007,0]}  
{"pcid":3,"pt":[-122.211,46.1886,1874.3,0,0,0,0,0,2,0,0,21,0,242,242,238,7.4041  
5e+006,0]}  

<?xml version="1.0" encoding="UTF-8"?>  
<Pipeline version="1.0">  
<Writer type="drivers.pgpointcloud.writer">  
<Option name="connection">dbname='lidar' user='postgres'  
password='password'</Option>  
<Option name="table">StHelens4326</Option>  
<Option name="srid">4326</Option>  
<Filter type="filters.chipper">  
<Option name="capacity">400</Option>  
<Filter type="filters.cache">  
<Reader type="drivers.las.reader">  
<Option name="filename">st2-helens.las</Option>  
<Option name="spatialreference">EPSG:4326</Option>  
</Reader>  
</Filter>  
</Filter>  
</Writer>  
</Pipeline>  

--  
Ashley Mort  
Sr. Software Engineer  
Raytheon - Intelligence and Information Systems  
972-205-5165 (office)  
814-571-3039 (cell)  

_______________________________________________  
pdal mailing list  
pdal at lists.osgeo.org  
http://lists.osgeo.org/mailman/listinfo/pdal  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20141117/eccc14dc/attachment.html>


More information about the pdal mailing list