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.

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

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失