简体   繁体   中英

Accessing OSM data on AWS via Postgresql

How can I access the OSM data in postgresql that's hosted here as a volume in an EC2 instance? I'm unable to install postgres 8.3 AND deploy that cluster despite my best efforts. Here is what I've tried so far:

  1. pg_upgrade (binary files aren't available)
  2. Installing postgres 8.4 on Ubuntu 14.04 (8.3 & 8.4 aren't compatible)
  3. Installing postgres 8.3 on Ubuntu 14.04 from source (pg_createcluster is unable to find initdb)
  4. Installing postgres 8.3 on Ubuntu 8.04 from package (distribution is no longer supported & I'm unable to track down the dependencies)
  5. Installing postgres 9.3 on Ubuntu 14.04 (after changing postgres.conf I find that the database file isn't compatible)

Has anyone found a strategy that works for them? My next steps are to download the OSM file and use one of the converters. That will take considerably more resources and is probably error prone. Thanks!

Postgres 8.3 is very old (EOL end of 2013), so probably you're better off importing the database on your own as those versions may contain security issues and aren't that great from a performance viewpoint.

There is some step by step documentation on how to set up a rendering stack on switch2osm . If you want to do something different than rendering OSM tiles, you can also use imposm , which allows you to import selective data into a PostgreSQL database.

In case you want to have more flexibility on querying data without having to deal with database mapping, maybe Overpass API is a solution for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM