[pgpointcloud] Columns and patch schema matching

Howard Butler howard at hobu.co
Mon Dec 16 08:24:38 PST 2013


Should this typemod be on by default, or alternatively, should we craft an option to allow you to turn it off?

On Dec 16, 2013, at 9:46 AM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:

> This error is the typmod guard complaining. You’ve defined a table like
> 
> CREATE TABLE patchs ( gid INTEGER PRIMARY KEY, pa PCPATCH(1) );
> 
> So your table is been referenced to PCID 1, in the pa column definition.
> If you when try and insert a patch with PCID 2, it’ll complain.
> 
> You could define a column a PCPATCH without a PCID constraint, if you want to mix your PCIDs in one column. Or you could force a PCID, if you’re certain about the dimensionality of your inputs. 
> 
> P 
> 
> 
> --  
> http://postgis.net  
> http://cleverelephant.ca
> 
> 
> On December 16, 2013 at 7:41:07 AM, Howard Butler (howard at hobu.co) wrote:
>> 
>> I am loading a bunch of files, and one of the errors I frequently  
>> see but don't completely understand is the following:
>> 
>>> Caught PDAL exception: ERROR: column pcid (1) and patch pcid  
>> (2) are not consistent
>> 
>> 
>> I take it this means that the schema of the patch I'm currently  
>> loading (from file B) doesn't currently match the schema of the  
>> column I'm inserting data into (created by file A, I suppose)?  
>> So the question becomes how do I harmonize my directory of 35,000  
>> files into a single schema that pgpointcloud can love? I see the  
>> writer has the ability to override the schema with a "pcid" option,  
>> but this points the danger at your toes.
>> 
>> In PDAL, there is a filter called "filters.selector"[1] which  
>> has the ability to mark which dimensions in the pipeline's schema  
>> should be kept, ignored, or created. It should be the responsibility  
>> of the "drivers.pgpointcloud.writer" to make sure to pack()  
>> the schema and pack() the data it is writing to remove ignored  
>> dimensions. This is the only way I can think of to harmonize the  
>> layout of all 35,000 files into the same schema. To that end, I  
>> have added some code to PDAL to support this, and updated the pgpointcloud  
>> writer to use it.
>> 
>> In oracle's point cloud storage, each patch has a reference to  
>> its own schema rather than the entire table pointing at a single  
>> schema (often a bunch of patches pointing at the same one, but  
>> that's an implementation detail). This is difference that should  
>> be pointed out in documentation and examples more clearly. I  
>> will come up with an example that uses the selector filter and  
>> provide a pull request to incorporate it with detail on why you  
>> should care.
>> 
>> Howard
>> 
>> [1] http://www.pointcloud.org/stages/filters.selector.html  
>> _______________________________________________
>> pgpointcloud mailing list
>> pgpointcloud at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/pgpointcloud  
>> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20131216/0ddaf10a/attachment.pgp>


More information about the pgpointcloud mailing list