[Tile-serving] [openstreetmap/osm2pgsql] osm2pgsql-replication: use custom SRID (PR #1698)
Jakob Miksch
notifications at github.com
Sun Jul 24 10:23:32 UTC 2022
I discovered the script `osm2pgsql-replication` only works if the OSM import is done using the "standard" SRID `3857` (Web Mercator). For other SRIDs the script fails with this error message:
```
2022-07-24 12:20:14 ERROR: DB copy thread failed: Ending COPY mode for 'munster_point' failed: ERROR: Geometry SRID (3857) does not match column SRID (25832)
CONTEXT: COPY munster_point, line 1, column way: "0101000020110F0000BBE39EB508C628413EAB91CF1BC25941"
..
Traceback (most recent call last):
File "/usr/local/bin/osm2pgsql-replication", line 531, in <module>
sys.exit(main())
File "/usr/local/bin/osm2pgsql-replication", line 524, in main
ret = args.handler(conn, args)
File "/usr/local/bin/osm2pgsql-replication", line 395, in update
subprocess.run(osm2pgsql, check=True)
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['osm2pgsql', '--append', '--slim', '--prefix', 'munster', '/tmp/tmpxw8d_x4m/osm2pgsql_diff.osc.gz']' returned non-zero exit status 2.
```
This PR makes it possible to also update databases with other SRIDs.
Please let me know if I should change anything, I am ready to adapt the code if required.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1698
-- Commit Summary --
* osm2pgsql-replication: use custom SRID
-- File Changes --
M scripts/osm2pgsql-replication (22)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1698.patch
https://github.com/openstreetmap/osm2pgsql/pull/1698.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1698
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1698 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220724/9c3159ba/attachment.htm>
More information about the Tile-serving
mailing list