Install and execute pycsw with a PostgreSQL with PostGIS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Install and execute pycsw with a PostgreSQL with PostGIS

Rodrigo Mariano
Hello everyone,


I'm trying to test the pycsw to use it to serve the metadata of my
project, but I'm not able to test it.

I would like to create a table in Postgres (PostGIS) database and serve
this table (metadata) through CSW in XML using the ISO 19115. Is it
possible?

I followed the steps described in the following link, but no success.
http://docs.pycsw.org/en/stable/installation.html#for-developers-and-the-truly-impatient

The first error that I've got, I described on Github[1],  but Tom asked
me to send an e-mail here.

Well, I followed his tip and I tried to add the database using the
following steps [2], however without success again, unfortunately.

First of all, I tried to run the command without database called "pycsw"
and it returned an error saying "database "pycsw" does not exist" and
below " Database tables already exist" (image
table_does_not_exist_but_it_exist.png [5]). For that reason, I did not
understand what happened.

Then I tried to create the database manually and run the command again.
In this time, I got the following error: "language "plpythonu" does not
exist" (image plpythonu_does_not_exist.png [5]).

So I tried to install the plpythonu and create the extension with the
following links [3] and [4]. After that, I tried to run the command
again and I got the same error again.

Could someone help me?

Thank you in advance.


[1] https://github.com/geopython/pycsw/issues/590#event-2233013283

[2]
http://docs.pycsw.org/en/stable/administration.html#metadata-repository-setup

[3]
https://stackoverflow.com/questions/26091390/postgresql-how-to-install-plpythonu-extension

[4] https://www.postgresql.org/docs/9.1/plpython.html

[5]
https://drive.google.com/drive/folders/1suUqrRsxwxkuQenfa70MEMAljLPkYzJB?usp=sharing

Best Regards,

Rodrigo


_______________________________________________
pycsw-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pycsw-devel
Reply | Threaded
Open this post in threaded view
|

Re: Install and execute pycsw with a PostgreSQL with PostGIS

tomkralidis
Hi Rodrigo: thanks for the info.  For PostgreSQL/PostGIS installs, the
following are required:

- PostgreSQL database exists, with PostGIS enabled
- plpythonu is not required for PostgresSQL enabled with PostGIS
- the pycsw configuration is pointing to the PostgreSQL with PostGIS install and
correct database name (which has been PostGIS-enabled).  pycsw will
create the records table
- you need psycopg2 installed (see requirements-pg.txt)

Then, running pycsw-admin.py -c setup_db -f default.cfg will then simply
create the 'records' table.  I was able to set this up against the
kartoze/postgis
docker image, for example, with success.

Can you ensure that your database setup is per above, and that the pycsw
configuration is pointing to that database?

Cheers

..Tom





On Thu, Mar 28, 2019 at 8:13 AM Rodrigo M. Mariano
<[hidden email]> wrote:

>
> Hello everyone,
>
>
> I'm trying to test the pycsw to use it to serve the metadata of my
> project, but I'm not able to test it.
>
> I would like to create a table in Postgres (PostGIS) database and serve
> this table (metadata) through CSW in XML using the ISO 19115. Is it
> possible?
>
> I followed the steps described in the following link, but no success.
> http://docs.pycsw.org/en/stable/installation.html#for-developers-and-the-truly-impatient
>
> The first error that I've got, I described on Github[1],  but Tom asked
> me to send an e-mail here.
>
> Well, I followed his tip and I tried to add the database using the
> following steps [2], however without success again, unfortunately.
>
> First of all, I tried to run the command without database called "pycsw"
> and it returned an error saying "database "pycsw" does not exist" and
> below " Database tables already exist" (image
> table_does_not_exist_but_it_exist.png [5]). For that reason, I did not
> understand what happened.
>
> Then I tried to create the database manually and run the command again.
> In this time, I got the following error: "language "plpythonu" does not
> exist" (image plpythonu_does_not_exist.png [5]).
>
> So I tried to install the plpythonu and create the extension with the
> following links [3] and [4]. After that, I tried to run the command
> again and I got the same error again.
>
> Could someone help me?
>
> Thank you in advance.
>
>
> [1] https://github.com/geopython/pycsw/issues/590#event-2233013283
>
> [2]
> http://docs.pycsw.org/en/stable/administration.html#metadata-repository-setup
>
> [3]
> https://stackoverflow.com/questions/26091390/postgresql-how-to-install-plpythonu-extension
>
> [4] https://www.postgresql.org/docs/9.1/plpython.html
>
> [5]
> https://drive.google.com/drive/folders/1suUqrRsxwxkuQenfa70MEMAljLPkYzJB?usp=sharing
>
> Best Regards,
>
> Rodrigo
>
>
> _______________________________________________
> pycsw-devel mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/pycsw-devel
_______________________________________________
pycsw-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pycsw-devel