Hi,

I downloaded planet-latest.osm and I want to import data for Eastern Europe in a PostgreSQL database. I tested the osmosis command for a small region and what I observed is that it imports all the changeset history. I find this information redundant for my application and I only want to import the most recent node from the changeset.

The command I used:
7z.exe e -so "I:\Restricted\Radu\Facultate\2012-2013\Licenta\planet-latest.osm.bz2" | "C:\Program Files (x86)\osmosis\bin\osmosis.bat" --read-xml file=- --bounding-box left=12.481037 top=41.894315 right=12.485399 bottom=41.891903 --write-pgsql database="europe" user="postgres" password="parola"

How can I do that and in what way will it affect my database in the future if I plan to update data using daily regular diffs.

Thank you,
Radu-Stefan Zugravu

asked 15 Apr '13, 23:33

raduzugravu's gravatar image

raduzugravu
316610
accept rate: 0%

edited 15 Apr '13, 23:34


The standard planet file does not include any history, and the "snapshot" schema used by the Osmosis `--write-pgsql`` task you mention does not have room for history information. You must be mistaken.

permanent link

answered 16 Apr '13, 10:56

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
64.0k77595995
accept rate: 24%

Hi,

Maybe I didn't make myself clear so I will try to give you an example. Here are three different nodes from the area pointed above, extracted from planet.osm:

node id="1270510177" version="3" timestamp="2011-08-05T22:00:21Z" uid="430115" user="Emistrac" changeset="8933229" lat="41.8941708" lon="12.4831246"
node id="1270510178" version="3" timestamp="2011-08-05T22:00:21Z" uid="430115" user="Emistrac" changeset="8933229" lat="41.8941769" lon="12.4831607"
node id="1270511991" version="3" timestamp="2011-08-05T22:00:21Z" uid="430115" user="Emistrac" changeset="8933229" lat="41.8941797" lon="12.4828525"

If I execute a reverse search all 3 nodes will return same result. When I import this to a postgresql database it will create 3 different rows for each row. Is it normal?

(16 Apr '13, 11:35) raduzugravu
1

They're three different nodes (3 different geographical items). To omit any of them would mean that your database is not complete.

Also, what do you mean by "execute a reverse search" here?

(16 Apr '13, 11:59) SomeoneElse ♦

This is what I mean.
http://nominatim.openstreetmap.org/reverse?lat=41.8941708&lon=12.4831246
http://nominatim.openstreetmap.org/reverse?lat=41.8941769&lon=12.4831607
http://nominatim.openstreetmap.org/reverse?lat=41.8941797&lon=12.4828525
This 3 requests will return the same place. The latitude and longitude values are the ones for the three different nodes listed above. Why is this necessary?

(16 Apr '13, 12:40) raduzugravu

In what way is that wrong? If I was at any of those three lat/long combinations I'd say that I was at that momument. What do you expect Nominatim to return for those lat/long combinations?

(16 Apr '13, 12:46) SomeoneElse ♦
1

Did you look at the data? The first two nodes are part of this footway and the third one belongs to this building. These are three more or less independent nodes and each of them is useful. They don't have anything to do with a history.

(16 Apr '13, 12:53) scai ♦
1

Thank you scai.
I missinterpreted the data. It all makes sense now.
I am really sorry.

(16 Apr '13, 13:33) raduzugravu
showing 5 of 6 show 1 more comments
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:

×150
×94

question asked: 15 Apr '13, 23:33

question was seen: 2,037 times

last updated: 16 Apr '13, 13:33

powered by OSQA