How to connect PostGIS and Mergin Maps

  Рет қаралды 2,438

Mergin Maps

Mergin Maps

Жыл бұрын

See how you can leverage Mergin Maps platform API to sync between QGIS and PostgreSQL/PostGIS database by Mergin-DB-Sync tool.
We follow quick start available on github.com/MerginMaps/mergin-...
1) Setup PG container
- curl raw.githubusercontent.com/Mer... -o test_data.sql
- docker run --name some-postgis -v $(pwd):/opt/hostdata -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgis/postgis
- docker exec -ti some-postgis psql -U postgres -c "CREATE DATABASE dbsync OWNER postgres"
- docker exec -ti some-postgis psql -U postgres -d dbsync -c "CREATE EXTENSION postgis;"
- docker exec -ti some-postgis psql -U postgres -d dbsync -f /opt/hostdata/test_data.sql
2) create config file
- curl raw.githubusercontent.com/Mer... -o config.yaml
- cat config.yaml
mergin:
url: app.merginmaps.com
username: REPLACE_your_username
password: REPLACE_your_password
init_from: db
connections:
- driver: postgres
conn_info: "host=127.0.0.1 dbname=dbsync user=postgres password=mysecretpassword"
modified: sync_data
base: sync_data_base
mergin_project: REPLACE_your_workspace/REPLACE_your_project_name
sync_file: data.gpkg
daemon:
sleep_time: 10
3) create blank project on app.merginmaps.com
4) start deamon
- docker run --name mergin_db_sync -it --network="host" -v $(pwd):/settings lutraconsulting/mergin-db-sync:latest /settings/config.yaml
Need support with more complicated setups?
- merginmaps.com/community/join
- merginmaps.com/support
See more: merginmaps.com

Пікірлер: 10
@joaquinurruti2628
@joaquinurruti2628 Жыл бұрын
Hello! This is fantastic thank you! One question: For a database running in AWS DB Sync is installed and runs every 10s in the server? or do I have to install it locally on the machine of everyone in the team?
@zilolv
@zilolv Жыл бұрын
Hi, db-sync should be installed only once for whole setup and on some server. If you have AWS cloud, ideally you run db-sync on some small machine, or in kubernetes or in some other small deployment option.
@joaquinurruti2628
@joaquinurruti2628 Жыл бұрын
@@zilolv Thanks you very much for your answer and congratulations for your job Peter!
@joaquinurruti2628
@joaquinurruti2628 Жыл бұрын
​@@zilolv Hi Peter thank you very much I tryied it and it works seamlessly. I'm thinking of getting a subscription, we are a small team collaborating with data. I wanted to know if it's posible to share one geopackage between different mergin projects?
@zilolv
@zilolv Жыл бұрын
Technically yes, but it is not super recommended atm
@MrLESPERGUER
@MrLESPERGUER Жыл бұрын
Hello, I have checked in Mergin web site, the db-sync only its available for team suscription, not for professional or indiviual suscription. :(
@zilolv
@zilolv 11 ай бұрын
Hi, it is indeed available for team subscription, as well as all on-premises installations.
@namratakarki6685
@namratakarki6685 Жыл бұрын
Can we do it using SQL shell instead of Docker?
@zilolv
@zilolv Жыл бұрын
I am not sure if I understand the question, but mergin-db-sync is simply Python utility that can be run in any Python environment, but the easiest solution is to start pre-made docker container with the solution.
@namratakarki6685
@namratakarki6685 Жыл бұрын
@@zilolv Thanks ! Will try it !
Manage multiple field teams with Mergin Maps workpackages
12:33
Using multiple pictures per observation point
9:15
Mergin Maps
Рет қаралды 835
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 55 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН
QGIS User 0053 - PostGIS for QGIS and QField
15:10
Klas Karlsson
Рет қаралды 6 М.
Mergin Maps and Bad Elf
7:11
Bad Elf
Рет қаралды 710
How to move photos from Mergin Maps to MinIO/S3
8:05
Mergin Maps
Рет қаралды 543
Using QGIS with PostGIS
46:34
Crunchy Data
Рет қаралды 36 М.
Quick start guide
14:50
Mergin Maps
Рет қаралды 692
Position Tracking in Mergin Maps
11:34
Hans van der Kwast
Рет қаралды 1,6 М.
Installing PostGIS with Docker
7:56
Geospatial Programming
Рет қаралды 5 М.
How to build a FastAPI app with PostgreSQL
27:37
Eric Roby
Рет қаралды 42 М.
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН