You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sis.apache.org by Florian Micklich <mi...@apache.org> on 2022/08/04 10:51:57 UTC

Setup Postgres EPSG for Apache SIS

Hi everyone,
I want to implement the EPSG dataset and due licence requirements I am
not able to use the database installer or as embedded database
mentioned here [1]. I have to use the dowloadable EPSG Postgres files
[2]. The setup is working well and is running in a docker setup. 
Now my question. It is possible to use this dataset together with
Apache SIS  with a basic  JDBC conenciton?I am not sure about the JNDI
implementation mentioned here [3]. Is this the only way?  How can I
setup the host, Port etc. to create a connection so it can be used .

My goal is to be able to use some basisc reprojection something like:
    CoordinateReferenceSystem sourcerCRS =
getCRS(geom.getSRID());    CoordinateReferenceSystem targetrCRS =
getCRS(targetEPSG);    CoordinateOperation operator =
getOperator(sourcerCRS, targetrCRS);    ....
Any help is appreciated :)Kind regards Florian
[1]  https://sis.apache.org/epsg.html[2] https://epsg.org/home.html[3] 
https://sis.apache.org/epsg.html



Re: Setup Postgres EPSG for Apache SIS

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello again

I have updated the page about using EPSG geodetic dataset:

https://sis.apache.org/epsg.html#manually-setup-an-epsg-database

Note (I forgot to specify in previous email). Il you install your own 
EPSG database, it needs to be a version 9.x. The EPSG database version 
10.x is not yet supported. This upgrade is planed but not yet done.

     Martin



Re: Setup Postgres EPSG for Apache SIS

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Florian

Le 04/08/2022 à 12:51, Florian Micklich a écrit :

> (…snip…) Now my question. It is possible to use this dataset together 
> with Apache SIS  with a basic  JDBC conenciton?
>
Yes. You can create your own javax.sql.DataSource and specify it to the 
org.apache.sis.setup.Configuration class, method setDatabase(…).


> I am not sure about the JNDI implementation mentioned here [3]. Is 
> this the only way?
>
The JNDI is a way to specify a data source in a web container like 
Tomcat, where the data source is managed by Tomcat itself. But indeed 
this is not the only way; we should update that page.

     Martin