[pycsw-devel] Issues with the PostGIS backend + real live metadata

Tom Kralidis tomkralidis at hotmail.com
Wed Aug 21 08:11:33 PDT 2013


Comments inline:

Sent from my iPhone

On 2013-08-21, at 11:02, "Angelos Tzotsos" <gcpp.kalxas at gmail.com> wrote:

> Hi Adria,
> 
> Thanks for the feedback.
> 
> Some comments inline:
> 
> 
> On Wed, Aug 21, 2013 at 1:54 PM, Adrià Mercader <adria.mercader at okfn.org> wrote:
>> Hi all,
>> 
>> I've been playing around trying to set up pycsw with Postgres +
>> PostGIS as backend, with mixed results. Here are a list of things I
>> found:
>> 
>> 
>> * If I understood the docs correctly [1], if you are using PostGIS
>> (which the script will autodetect), the native PostGIS functions will
>> be used and there is no need for the plpythonu functions. But if you
>> call setup_db with create_plpythonu_functions=False, the geometry
>> column and the trigger are not created, as they are in the same code
>> block as the plpythonu functions creation.
> 
> 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.
> But yes, you understood correctly, thanks for the fix.
>  

>> It looks like this commit
>> moved the indentation one level down [2].
>> 
>> The rest of issues that followed assumed that this was fixed (ie I can
>> use PostGIS without plpythonu), but please correct me if wrong.
>> 
>> * After setting up the wkb_geometry in this way I always got an
>> IntegrityError exception when trying to load a document which has a
>> bbox defined. This was easy to spot, there was a typo in the srid on
>> AddGeometryColumn.
>> 
>> This PR fixes both issues:
>> 
>> https://github.com/geopython/pycsw/pull/177
> 
> good catch, thanks

Thanks for this Adrià. And thanks to Angelos for merging to master and 1.6 branch.


>  
>> 
>> * On several documents I tried I got exceptions because the fields
>> defined were too short:
>> 
>> DataError('(DataError) value too long for type character varying(256)\n',)
>> 
>> See eg the abstract field in [3][4] or conditionapplyingtoaccessanduse
>> in [5] (you find this with much more fields once you start importing
>> large numbers of records).
>> I'm not a DB expert, and I certainly can't talk for sqlite, but I
>> would imagine that changing the column definitions to character
>> varying(x) to text would have no effect on performance while removing
>> all kind of text length limit problems. This is a good resource [6]
> 
> +1
>  


+1. Can someone open a ticket here?

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). 

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. 


>> 
>> * As a really minor general comment, the exceptions raised while
>> loading documents [8] are a bit too noisy, as they output the whole
>> document, making difficult to know what actually went wrong.
> 
> Yes this is true.

Fixed in master and 1.6 branch. 

>  
>> 
>> Hope this helps,
>> 
>> Adrià
> 
> Best,
> Angelos
> 
> 
> 
> 
> -- 
> Angelos Tzotsos
> Remote Sensing Laboratory
> National Technical University of Athens
> http://users.ntua.gr/tzotsos
> _______________________________________________
> pycsw-devel mailing list
> pycsw-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pycsw-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pycsw-devel/attachments/20130821/b43f336e/attachment-0001.html>
-------------- next part --------------
_______________________________________________
pycsw-devel mailing list
pycsw-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pycsw-devel


More information about the pycsw-devel mailing list