[pdal] las2pg and las2col

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[pdal] las2pg and las2col

Oscar Martinez Rubi-2

Hi,

 

We have added in liblas (master branch in github) two new tools that maybe useful for DB users:

 

-          las2pg: converts a LAS/LAZ into PostgreSQL binary dump format. It can be used for faster flat (1 point per row) data insertion in PostgreSQL. This is useful when you use flat tables for your point clouds (not recommended for large point clouds) of if you want to create pc_patches in a custom manner (other than what PDAL does). It is the alternative to making the insert with las2txt (essentially binary is faster than ASCII). Example of usage:

 

psql -c "create table flat (x double precision, y double precision, z double precision, r integer, g integer, b integer, i integer)"

las2pg -i 1.2-with-color.laz --parse xyzRGBi --stdout | psql -c "copy flat from stdin with binary"

 

 

-          las2col: similarly to las2pg, this tool converts a LAS/LAZ into binary columnar files to be imported in the column-store MonetDB (https://www.monetdb.org/). Example of usage:

 

las2col -i 1.2-with-color.laz -o out --parse XYZi

mclient <db_name> -s "create table flat (x decimal(8,2), y decimal(8,2), z decimal(8,2), i smallint)"

mclient <db_name> -s "COPY BINARY INTO flat FROM ('<full_parent_path>/out_col_x.dat','<full_parent_path>/out_col_y.dat','<full_parent_path>/out_col_z.dat','<full_parent_path>/out_col_i.dat')"

 

If time permits, we will add similar writers in PDAL, so the same functionality is available through PDAL 😊

 

Kind Regards,

 

O.

 

| 4th National eScience Symposium | Science in a Digital World |
| 13 October 2016 | https://www.esciencecenter.nl/event/4th-national-escience-symposium |

| Oscar Martinez Rubi | eScience Engineer | [hidden email] |
| Netherlands eScience Center | http://www.esciencecenter.nl | T +31 (0) 6-10363806 |

 


_______________________________________________
pdal mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] las2pg and las2col

Rémi Cura
Hey,
this is a really great functionality !
I wonder how much faster it is (you said about 10x, which is super cool).

Cheers,
Rémi-C

2016-07-05 10:26 GMT+02:00 Oscar Martinez Rubi <[hidden email]>:

Hi,

 

We have added in liblas (master branch in github) two new tools that maybe useful for DB users:

 

-          las2pg: converts a LAS/LAZ into PostgreSQL binary dump format. It can be used for faster flat (1 point per row) data insertion in PostgreSQL. This is useful when you use flat tables for your point clouds (not recommended for large point clouds) of if you want to create pc_patches in a custom manner (other than what PDAL does). It is the alternative to making the insert with las2txt (essentially binary is faster than ASCII). Example of usage:

 

psql -c "create table flat (x double precision, y double precision, z double precision, r integer, g integer, b integer, i integer)"

las2pg -i 1.2-with-color.laz --parse xyzRGBi --stdout | psql -c "copy flat from stdin with binary"

 

 

-          las2col: similarly to las2pg, this tool converts a LAS/LAZ into binary columnar files to be imported in the column-store MonetDB (https://www.monetdb.org/). Example of usage:

 

las2col -i 1.2-with-color.laz -o out --parse XYZi

mclient <db_name> -s "create table flat (x decimal(8,2), y decimal(8,2), z decimal(8,2), i smallint)"

mclient <db_name> -s "COPY BINARY INTO flat FROM ('<full_parent_path>/out_col_x.dat','<full_parent_path>/out_col_y.dat','<full_parent_path>/out_col_z.dat','<full_parent_path>/out_col_i.dat')"

 

If time permits, we will add similar writers in PDAL, so the same functionality is available through PDAL 😊

 

Kind Regards,

 

O.

 

| 4th National eScience Symposium | Science in a Digital World |
| 13 October 2016 | https://www.esciencecenter.nl/event/4th-national-escience-symposium |

| Oscar Martinez Rubi | eScience Engineer | [hidden email] |
| Netherlands eScience Center | http://www.esciencecenter.nl | T +31 (0) 6-10363806 |

 


_______________________________________________
pdal mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/pdal


_______________________________________________
pdal mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/pdal