NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I have read all the documentation on osmosis and after that I tryed to import the OSM file into a MySQL database. It seems that I receive a lot of errors and I think that the database structure I am using is not complete, so there are conflicts even if I am am using " validateSchemaVersion = no".

I tryed to use --write-mysql as well as --write-apidb but non of those worked.

So, can someone tell me step by step how can I import the OSM file to a mysql database? I read something about some PHP scripts that can do this. Where can I find one of those scripts???


Thank you!

asked 11 Jul '12, 21:37

Alexandru's gravatar image

Alexandru
15555
accept rate: 0%


The big question here is what do you want to do with the data? How do you want to get the data out of the database?

There are countless ways of importing and storing osm data in a database. Osmosis is able to read and write the deprecated MySql scheme that was used by the old website and editing api. If you are interesting in doing that for nostalgic reasons you can install an old version of the rails port that supported the MySql schema and then use osmosis to import the data to that. You can check out the old versions at git.osm.org. That will give you a website that is like you would get if you visited www.osm.org in early 2009.

After some searching I have found some php classes that can deal with the osm editing api, for instance Services_OpenStreetMap. However that is an api for editors and have nothing with any databases (except the core database that powers the api).

permanent link

answered 11 Jul '12, 22:31

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

edited 11 Jul '12, 23:09

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:

×252
×34
×21

question asked: 11 Jul '12, 21:37

question was seen: 5,763 times

last updated: 11 Jul '12, 23:09

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum