[pdal] coordinate precision pgpointcloud writer?

Ashley Mort ashley_c_mort at raytheon.com
Tue Nov 18 04:36:42 PST 2014


Those accessors would be useful; the first or second.  I am basically 
just trying to create a csv of x,y,z,r,b,g out of all my pcpoints.

On 11/17/2014 10:40 PM, Paul Ramsey wrote:
> Not at the moment, but I’ve had requests for some different kinds of 
> accessors, like
>
> PC_Get(pcpoint, ARRAY[text]) -> ARRAY[double]
>
> Or even
>
> PC_Get(pcpatch, text) -> ARRAY[double]
>
> Or (and i wonder if this is wise)
>
> PC_Get(pcpatch, ARRAY[text]) -> ARRAY[ARRAY[double]]
>
> Do you have any interest in that kind of thing?
>
> -- 
> Paul Ramsey
> http://cleverelephant.ca
> http://postgis.net
>
> On November 17, 2014 at 7:49:48 PM, Ashley Mort 
> (ashley_c_mort at raytheon.com <mailto:ashley_c_mort at raytheon.com>) wrote:
>
>> Ok thanks!  That helps alot.  My higher precision is there if I use 
>> PC_Get.  Is there a more efficient way of querying other than:
>>
>> select PC_Get(PC_Explode(pa),'X'), PC_Get(PC_Explode(pa),'Y'), 
>> PC_Get(PC_Explode(pa),'Z'), PC_Get(PC_Explode(pa),'Red'), 
>> PC_Get(PC_Explode(pa),'Green'), PC_Get(PC_Explode(pa),'Blue') from 
>> sthelens4326 limit 100000;
>>
>>
>> On 11/17/2014 5:50 PM, Paul Ramsey wrote:
>>> (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 <mailto: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
>>
>>
>> --
>> Ashley Mort
>> Sr. Software Engineer
>> Raytheon - Intelligence and Information Systems
>> 972-205-5165 (office)
>> 814-571-3039 (cell)


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20141118/cc5c07b6/attachment-0001.html>


More information about the pdal mailing list