[
https://issues.apache.org/jira/browse/STREAMPIPES-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626562#comment-17626562
]
Florian Micklich commented on STREAMPIPES-584:
----------------------------------------------
{code:java}
Answer:
-------- Ursprüngliche Nachricht --------<br>
Von: Martin Desruisseaux
<[[email protected]](mailto:martin%20desruisseaux%20%[email protected]%3e)><br>
Antwort an: [[email protected]](mailto:[email protected])<br>
An: [[email protected]](mailto:[email protected])<br>
Betreff: Re: manually setup an EPSG database base information<br>
Datum: Sun, 30 Oct 2022 00:44:36 +0200<br>
Hello Florian<br>
The following line:<br>
> ```
Configuration.current().setDatabase((Supplier<DataSource>) createDataSource());
> ```
>
Should be replaced by:<br>
> ```
Configuration.current().setDatabase(MyJavaApp::createDataSource);```
>
Where MyJavaApp is the class
where is defined the createDataSource()
static method. Everything else should be fine.<br>
With this setting, MyJavaApp.createDataSource()
will be invoked by SIS exactly once the first time that an EPSG
code is used. Then the DataSource.getConnection()
method will invoked (by SIS again) for getting the connection.
The connection will be used and closed after a short timeout.
There is no need to open and close connections on your side.<br>
The first time that a connection is established, SIS will
search for EPSG tables in all database schemas and will remember
in which schema the tables were found. So it is okay to put the
EPSG tables in any schema (not necessarily "public"). On my side I like
to create
a separated "epsg" schema for
those tables.<br>
If there is many copies of EPSG dataset in different schemas,
SIS checks the EPSG dataset version number and use by default
the most recent EPSG dataset. It is possible to request to use
of a specific version of EPSG dataset by specifying the version
number before EPSG code, for example "EPSG:9.0:4326".<br>
One last note: the SQL scripts provided by EPSG do not include
the creation of index. For better performances, you may want to
also execute the following file in SIS repository:<br>
> ```
core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql
> ```
>
Martin
{code}
> Implementing possibility for reprojection Coordinates
> -----------------------------------------------------
>
> Key: STREAMPIPES-584
> URL: https://issues.apache.org/jira/browse/STREAMPIPES-584
> Project: StreamPipes
> Issue Type: New Feature
> Components: Backend, Pipeline Elements
> Reporter: Florian Micklich
> Assignee: Florian Micklich
> Priority: Major
> Attachments: .env, docker-compose.yml, settings_epsg.png,
> workflow.png, workflow_v2.png
>
>
> h1. Goal:
> Essential Task in Geo is to reproject between different Coordinate Reference
> Systems (CRS)
> e.g for special calculations which needs meter as CRS Unit instead of degree
> (as it it in WGS84)
> h1. Libs and Sources:
> Lib for reprojection would be
> https://sis.apache.org/
> Necessary extra package is the EPSG Library Source, which needs a special
> license agreement (not apache license).
> User Downloads the Postgres SQL Scripts here:
> https://epsg.org/auth/Account/Login
> During registration User agrees to license, so it can be used in StreamPipes.
> h1.
> h1. Following Workflow (to be discussed)
> The User unzipped the Scripts and but them into a specific folder.
> Then StreamPipes can start the docker-compose file and here the questions
> occurs.
> how to implement the service and where
> What happens if files are missing
> Where to register the connectionSource and how to validate?
> What happens if setup fails. Are geo processors active or special Exceptions
> during Pipeline Creation?
> !workflow_v2.png!
> Draft for EPSG Database Setup:
> !settings_epsg.png!
> h1. Material
> Docker-compose file for SP Service
> [^.env]
> [^docker-compose.yml]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)