[pgpointcloud] python tools for pgpointcloud
Rémi Cura
remi.cura at gmail.com
Sat Feb 14 04:07:49 PST 2015
Hello Bborie,
by pure luck I found your github repo that propose python tools for
pgpointcloud.
(here <https://github.com/dustymugs/pgpointcloud_utils>)
>From what I understood it can import an ogr layer (or geojson) into
postgres as a pgpointcloud patch, creating schema and format for this type
of points.
(with some limitations, maybe scale and offset?)
I am also in need of a python way to use pgpointcloud, in the inverse
direction that you
(you did OGR *->* pgpointcloud, I'm doing pgpointcloud *<->*numpy *->*(gdal,
...) )
First I tried a swig python interface to pgpointcloud C lib,
but I couldn't use it correctly because I don't know how to fabricate C
pointer in python. (I can provide the few changes to get the automatic SWIG
API if somebody is interested)
I wrote classes
<https://github.com/Remi-C/PPPP_utilities/blob/master/pointcloud/pg_pointcloud_classes.py>
to represent pc_schema, and tools to parse a xml pcschema and convert it to
the python class.
Then I wrote tools to convert pgpatch to/from strongly typed numpy array.
Those numpy array seems to be good candidates as a python common type,
because many python lib understand numpy (including gdal, and all the
scientific lib I use, like python-pcl, scikit-learn, etc ).
My next step
<https://github.com/Remi-C/PPPP_utilities/blob/master/pointcloud/patch_to_raster.py>
is to convert those numpy array into gdal rasters.
Obviously we already did some work twice (reading/writting wkb points for
instance, which was difficult for my python skill level).
Do you plan (or somebody else) to work further on pgpointcloud python
interface?
Cheers,
Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20150214/6ee25551/attachment.html>
More information about the pgpointcloud
mailing list