This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

ERROR: create/modify/delete sections can only contain nodes, ways, and relations

0

After run osm2pgsql --append --style /home/basil/src/openstreetmap-carto/openstreetmap-carto.style --tag-transform-script /home/basil/src/openstreetmap-carto/openstreetmap-carto.lua --database gis --username basil --prefix planet_osm --slim --cache 2048 --hstore /home/basil/src/planet/diff_api_changes.osc

I get error ERROR: create/modify/delete sections can only contain nodes, ways, and relations

file diff_api_changes.osc genetated by osmosis, and it included tag "modify"

<modify> <bounds minlon="-180.00000" minlat="-90.00000" maxlon="180.00000" maxlat="90.00000" origin="Osmosis 0.48.3"/> </modify>

asked 01 Oct '22, 13:03

basil_str's gravatar image

basil_str
11223
accept rate: 0%

2

What command line did you use with Osmosis to create that diff_api_changes.osc file? Having a <bounds> inside a <modify> doesn't look right to me.

(02 Oct '22, 15:03) Jochen Topf

osmosis --read-apidb database="drsk_osm" user="user" password="password" validateSchemaVersion=no --read-xml /home/basil/src/planet/map.osm --derive-change --write-xml-change /home/basil/src/planet/diff_api_changes.osc

(03 Oct '22, 06:28) basil_str
1

Interesting. Looks like a bug in Osmosis to me. I suggest opening an issue with them. If you remove that <bounds> XML element manually (it is superfluous anyway), osm2pgsql should be able to read the file.

(03 Oct '22, 08:14) Jochen Topf

This is true. Everything works fine if I remove the <bounds> tag. Tell me how to solve this problem? Any help or idea would be greatly appreciated

(03 Oct '22, 08:21) basil_str

Source code available on GitHub .