Why not ask your question on the new OpenStreetMap Community Forum?

I did create a self hosted map server with Mapnik and postgis. So i did append an OSM file which i created in josm. How i can delete those changes? I used --append switch when using osm2pgsql, Is it replace the old data with new one?

asked 06 Apr '18, 22:56

cybercoder's gravatar image

cybercoder
36668
accept rate: 0%


The answer is probably "with difficulty", unfortunately. If your new file contains changes and deletes then you'll need to find out what the previous versions of those objects were.

If, however your appended file only contained creates, then you can programmatically create a file that deletes those additions.

permanent link

answered 07 Apr '18, 00:07

SomeoneElse's gravatar image

SomeoneElse ♦
36.8k71369864
accept rate: 16%

One thing you could do is:

  • create a list of all relations, ways, and nodes mentioned in the file that you created in JOSM.
  • download all these objects from the OSM API (e.g. with something like wget -Omysfile.osm http://api.openstreetmap.org/api/0.6/nodes?nodes=1,2,3,4)
  • using --append mode again, add this data to your database, overwriting any modifications you made with current data from OSM.

This will not "go back" to whatever your data was before your modification, but instead "go forward" to whatever the current state is in OSM, but perhaps it helps?

permanent link

answered 07 Apr '18, 08:51

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.4k927201272
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×7

question asked: 06 Apr '18, 22:56

question was seen: 1,527 times

last updated: 07 Apr '18, 08:51

powered by OSQA