<div dir="ltr">Hello Paul and Howard,<div><br></div><div>I'm getting this error even if I import the same file twice, the first time with overwrite=true, and second time with false. </div><div>Shouldn't the schema be the same?</div>


<div><br></div><div>Roger<br></div><div><br></div><div><br></div><div><br></div><div><br></div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 6:18 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">

Yes, that seems reasonable. You could also create the table ahead of time and run in append mode.</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">P.</div> <div>

<div><br></div><span style="font-family:helvetica,arial;font-size:13px"></span>-- <br>Paul Ramsey<br><a href="http://cleverelephant.ca" target="_blank">http://cleverelephant.ca</a><div><a href="http://postgis.net" target="_blank">http://postgis.net</a></div>

</div><div><div class="h5"> <br><p style="color:#a0a0a8">On December 16, 2013 at 8:24:47 AM, Howard Butler (<a href="mailto://howard@hobu.co" target="_blank">howard@hobu.co</a>) wrote:</p> </div></div><blockquote type="cite">

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

Coordinate Solutions Inc.<br>
</div>