[pdal] coordinate precision pgpointcloud writer?
Ashley Mort
ashley_c_mort at raytheon.com
Mon Nov 17 15:37:30 PST 2014
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)
More information about the pdal
mailing list