You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Activate EPSG Database Service

CLI

If using the CLI add 'epsg' in StreamPipes environment file (.spenv) 
Running the `pipeline-element` environment, your environment file should look like this

spenv file with epsg
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[environment:pipeline-element]
backend
consul
extensions-all-jvm
couchdb
kafka
ui
sources-watertank-simulator
zookeeper
influxdb
epsg

Docker installer

Coming soon

K8s Helm

Coming soon



Prepare EPSG Database

The database, in which the epsg data will be imported, is already included as a service (Postgres DB). The Only step the user has to do is to fill the database with the required scripts.

Therefore, the following empty scripts must be replaced in the `incubator-streampipes/installer/scripts/epsg` folder

  • PostgreSQL_Table_Script.sql
  • PostgreSQL_Data_Script.sql
  • PostgreSQL_FKey_Script.sql
  • EPSG_FINISH.sql

Due to license agreement, you have to create an account https://epsg.org/user/register/
to accept the term of use https://epsg.org/terms-of-use.html of the 'EPSG Dataset'.

With an account, you can download the EPSG Dataset here: https://epsg.org/archives.html.
Make sure you download the EPSG-v9_9_1-PostgreSQL.zip, which supports the 2007 data model release. Higher versions are not yet supported by the Apache SIS https://sis.apache.org/, which is used in StreamPipes to handle Geometry reprojections.

Unzip the folder and replace files

  • PostgreSQL_Table_Script.sql
  • PostgreSQL_Data_Script.sql
  • PostgreSQL_FKey_Script.sql

in the `incubator-streampipes/installer/scripts/epsg` folder.

For indexing the imported data and get better performance, go to https://github.com/apache/sis/blob/master/core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql and download the file. 
Replace the file 

  • EPSG_FINISH.sql

in the `incubator-streampipes/installer/scripts/epsg` folder.



Import into Database

CLI

  1. Restart StreamPipes with `streampipes up -d`
  2. Now check if the database scripts were executed with 

    streampipes logs --follow epsg

If you already started StreamPipes before, the import was done with the empty scripts! You have to delete the corresponding docker volume. The scripts are only imported during the first start!

Therefore, make sure that StreamPipes is not running wit:

streampipes down

Now execut:

docker volume rm streampipes_epsg

Afterwords, you can repeat Step 1) and 2) 

Docker

Coming soon

K8s Helm

Coming soon

Check Data Import






  • No labels