<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Comments inline:<br><br>Sent from my iPhone</div><div><br>On 2013-08-21, at 11:02, "Angelos Tzotsos" <<a href="mailto:gcpp.kalxas@gmail.com">gcpp.kalxas@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Adria,<div><br></div><div>Thanks for the feedback.</div><div><br></div><div>Some comments inline:</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 21, 2013 at 1:54 PM, Adrià Mercader <span dir="ltr"><<a href="mailto:adria.mercader@okfn.org" target="_blank">adria.mercader@okfn.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I've been playing around trying to set up pycsw with Postgres +<br>
PostGIS as backend, with mixed results. Here are a list of things I<br>
found:<br>
<br>
<br>
* If I understood the docs correctly [1], if you are using PostGIS<br>
(which the script will autodetect), the native PostGIS functions will<br>
be used and there is no need for the plpythonu functions. But if you<br>
call setup_db with create_plpythonu_functions=False, the geometry<br>
column and the trigger are not created, as they are in the same code<br>
block as the plpythonu functions creation.</blockquote><div><br></div><div>I usually create plpythonu functions even if PostGIS is present. This way if for some reason postgis gets unavailable in the future, pycsw will continue to work.</div>
<div>But yes, you understood correctly, thanks for the fix.</div><div> </div></div></div></div></div></blockquote><div><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> It looks like this commit<br>
moved the indentation one level down [2].<br>
<br>
The rest of issues that followed assumed that this was fixed (ie I can<br>
use PostGIS without plpythonu), but please correct me if wrong.<br>
<br>
* After setting up the wkb_geometry in this way I always got an<br>
IntegrityError exception when trying to load a document which has a<br>
bbox defined. This was easy to spot, there was a typo in the srid on<br>
AddGeometryColumn.<br>
<br>
This PR fixes both issues:<br>
<br>
<a href="https://github.com/geopython/pycsw/pull/177" target="_blank">https://github.com/geopython/pycsw/pull/177</a><br>
<br></blockquote><div><br></div><div>good catch, thanks</div></div></div></div></div></blockquote><div><br></div><div>Thanks for this <span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Adrià. And thanks to Angelos for merging to master and 1.6 branch.</span></div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* On several documents I tried I got exceptions because the fields<br>
defined were too short:<br>
<br>
DataError('(DataError) value too long for type character varying(256)\n',)<br>
<br>
See eg the abstract field in [3][4] or conditionapplyingtoaccessanduse<br>
in [5] (you find this with much more fields once you start importing<br>
large numbers of records).<br>
I'm not a DB expert, and I certainly can't talk for sqlite, but I<br>
would imagine that changing the column definitions to character<br>
varying(x) to text would have no effect on performance while removing<br>
all kind of text length limit problems. This is a good resource [6]<br></blockquote><div><br></div><div>+1</div><div> </div></div></div></div></div></blockquote><div><br></div><div><br></div>+1. Can someone open a ticket here?<div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><br></span></div><div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Adrià: this fix we can't backport to 1.6 branch, so the fix will be applied to master (which will end up in 1.8.0). </span></div><div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Is this okay with you? Can you libe with this in master until 1.8.0 is cut? Not sure what your pycsw version requirements are. <br></span><div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
* As a really minor general comment, the exceptions raised while<br>
loading documents [8] are a bit too noisy, as they output the whole<br>
document, making difficult to know what actually went wrong.<br></blockquote><div><br></div><div>Yes this is true.</div></div></div></div></div></blockquote><div><br></div><div>Fixed in master and 1.6 branch. </div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Hope this helps,<br>
<br>
Adrià<br>
<br></blockquote><div><br></div><div>Best,</div><div>Angelos</div><div><br></div><div><br></div></div><br clear="all"><div><br></div>-- <br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><div>
Angelos Tzotsos</div><div>Remote Sensing Laboratory</div><div>National Technical University of Athens</div><div><a href="http://users.ntua.gr/tzotsos" target="_blank">http://users.ntua.gr/tzotsos</a></div></span></span>
</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>pycsw-devel mailing list</span><br><span><a href="mailto:pycsw-devel@lists.osgeo.org">pycsw-devel@lists.osgeo.org</a></span><br><span><a href="http://lists.osgeo.org/mailman/listinfo/pycsw-devel">http://lists.osgeo.org/mailman/listinfo/pycsw-devel</a></span><br></div></blockquote></div></div></body></html>