<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hey,<br></div><div class="gmail_default" style="font-family:monospace,monospace">As you seem to discover this pgpointcloud world,<br> maybe you could do this step by step.<br></div><div class="gmail_default" style="font-family:monospace,monospace">First create your point xml schema and test it within the database<br></div><div class="gmail_default" style="font-family:monospace,monospace">(meaning creating a random point and patch using it).<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">Then you can use lastool to output a few actual points in text,<br></div><div class="gmail_default" style="font-family:monospace,monospace">and manually create pgpoints from these values (casting point to text back to be sure your precision/offset and so is OK).<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">When you are sure everything works, then you can use pdal.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">Cheers,<br></div><div class="gmail_default" style="font-family:monospace,monospace">Rémi-C<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-20 2:52 GMT+02:00 Adam Steer <span dir="ltr"><<a href="mailto:Adam.Steer@anu.edu.au" target="_blank">Adam.Steer@anu.edu.au</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all<br>
<br>
I am attempting to ingest some points into postGIS-pointcloud, and basically failing at the start:<br>
<br>
- I want to ingest time,x,y,z,intensity,return number and classification<br>
- I’ve used pdal info —schema to get the numeric types, sizes and field names of my .LAS file (v1.4)<br>
- I’ve (maybe) built a format schema based on those (see below)<br>
- …and used a PDAL pipeline to try to ingest them.<br>
<br>
but I’ve managed to map something badly - PDAL returns:<br>
<br>
#> pdal pipeline postgis_pc_pipeline.xml<br>
PDAL: ERROR: pc_patch_uncompressed_from_wkb: wkb size and expected data size do not match<br>
LINE 1: INSERT INTO "blocks" ("pa") VALUES ('01020000000000000087130...<br>
<br>
While I’ve worked with points a lot, I’ve not used any clever things like postGIS pointcloud to manage them (because PhD, time, and triage between working with what exists and learning new things) - and now I’m learning on the fly (with a need to learn fast!)<br>
<br>
PDAL tells me I’m clearly missing something about the relationship between the size of things in my schema, and the size of things PDAL is getting from my .LAS file.<br>
<br>
Also I’m trying to be lazy - I should probably work out the scales and offsets correctly, and store XYZ as long integers. I wanted to try floating point storage (as real, which if I read correctly should be big enough).<br>
<br>
Any help will be highly appreciated!<br>
<br>
Thanks<br>
<br>
Adam<br>
<br>
----<br>
Here is my pipeline:<br>
<br>
# cat postgis_pc_pipeline.xml<br>
<br>
<?xml version="1.0" encoding="utf-8"?><br>
<Pipeline version="1.0"><br>
<Writer type="writers.pgpointcloud"><br>
<Option name="connection">host='localhost' dbname=‘….' user=‘….' password=‘….'</Option><br>
<Option name="table">blocks</Option><br>
<Option name="srid">28355</Option><br>
<Option name="pcid">2</Option><br>
<Filter type="filters.chipper"><br>
<Option name="capacity">5000</Option><br>
<Reader type="readers.las"><br>
<Option name="filename">./subsets/ACT2015-C3-ELL_6926094_55_0002_0002_7_12.las</Option><br>
<Option name="spatialreference">EPSG:28355</Option><br>
</Reader><br>
</Filter><br>
</Writer><br>
</Pipeline><br>
<br>
(notes here - should I use a filter to get *just* the fields I want - or does PDAL handle extracting only what exists in the schema?)<br>
<br>
…and my schema SQL:<br>
<br>
INSERT INTO pointcloud_formats (pcid, srid, schema) VALUES (2, 28335,<br>
'<?xml version="1.0" encoding="UTF-8"?><br>
<pc:PointCloudSchema xmlns:pc="<a href="http://pointcloud.org/schemas/PC/1.1" rel="noreferrer" target="_blank">http://pointcloud.org/schemas/PC/1.1</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"><br>
<pc:dimension><br>
<pc:position>1</pc:position><br>
<pc:size>8</pc:size><br>
<pc:description>Time as seconds of GPS week, as real<br>
</pc:description><br>
<pc:name>T</pc:name><br>
<pc:interpretation>real</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>2</pc:position><br>
<pc:size>8</pc:size><br>
<pc:description>X coordinate as real.</pc:description><br>
<pc:name>X</pc:name><br>
<pc:interpretation>real</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>3</pc:position><br>
<pc:size>8</pc:size><br>
<pc:description>Y coordinate as real</pc:description><br>
<pc:name>Y</pc:name><br>
<pc:interpretation>real</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>4</pc:position><br>
<pc:size>8</pc:size><br>
<pc:description>Z coordinate is ellipsoidal height as real<br>
</pc:description><br>
<pc:name>Z</pc:name><br>
<pc:interpretation>real</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>5</pc:position><br>
<pc:size>6</pc:size><br>
<pc:description>The intensity value is the integer representation<br>
of the pulse return magnitude. This value is optional<br>
and system specific. However, it should always be<br>
included if available.</pc:description><br>
<pc:name>Intensity</pc:name><br>
<pc:interpretation>uint16_t</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>6</pc:position><br>
<pc:size>1</pc:size><br>
<pc:description>Return number</pc:description><br>
<pc:name>ReturnNumber</pc:name><br>
<pc:interpretation>uint16_t</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:dimension><br>
<pc:position>7</pc:position><br>
<pc:size>1</pc:size><br>
<pc:description>Classification if supplied (ASPRS LAS guidelines)</pc:description><br>
<pc:name>Class</pc:name><br>
<pc:interpretation>uint16_t</pc:interpretation><br>
<pc:scale>1</pc:scale><br>
</pc:dimension><br>
<pc:metadata><br>
<Metadata name="compression">dimensional</Metadata><br>
</pc:metadata><br>
</pc:PointCloudSchema>');<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
_______________________________________________<br>
pgpointcloud mailing list<br>
<a href="mailto:pgpointcloud@lists.osgeo.org">pgpointcloud@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgpointcloud" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgpointcloud</a></blockquote></div><br></div>