drxzpo70788179614 2015-03-06 22:40
浏览 88
已采纳

如何在我的mysql数据库中获取planet-latest.osm.bz2?

I have an Intel i3-2350M CPU @ 2.30GHz with Windows 7, 64 bit, 4GByte Ram and enough free HD space.

The openstreetmap-file planet-latest.osm.bz2 is very big and compressed. (The version I have is 36 GByte compressed, and I believe it's like 100 GByte uncompressed. I have a mysql-database running, that I installed with XAMPP. (So I have apache and php available, too.)

My questions are:

  1. The OSM-project seems to have switched to postgresql and postgis. Is this really better (===faster) than MySql? (I strongly doubt that.)
  2. Is there a set of commands to get the compressed file into the database? Or would it reduce the risk of failure of the commands if I first decompress it? 2b. Could I discard of all XML-nodes that are not neccessary for the graphical output in the process of importing the data into the database? (With one stroke. :P )
  3. It's possible for me to convert the data to a .csv-file (out of the XML): Would that make it more complacent to get the data into the database?
  4. How long will the machine take? I can't let it run for hours without supervision. (I can break up the big file in smaller files, though I deem this to be error prone and not advisable.)

Greetings John

P.S. I have most if not all standard programs at hand that are linked ont he OSM-wiki. (Though the OSM-wiki is outright deficient and a bit outdated about the currently available tools.)

  • 写回答

1条回答 默认 最新

  • douzaipou3327 2015-03-06 23:02
    关注

    Open Street Map uses geographic information system features in postgreSQL that aren't available in MySQL. In particular, some of the operations use GIS map-projection features.

    Here's a description of the various schemas and their requirements for database server make and model. http://wiki.openstreetmap.org/wiki/Databases#Database_Schemas

    Both postgreSQL and MySQL are decently fast technologies on 64 bit platforms. For a database the size of global OSM, your performance will depend on fast storage as well as processing power.

    It's hard to give advice about what technology might be faster without knowing a lot more about what you're trying to do. But I can say this: by using the technology created and tested by the open street map team, your nodes-per-month performance will be higher for at least a couple of months -- the months you would spend adapting the data.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算