Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can import the node,ways,tags etc into a database schema like the one used for on the OpenStreetMap servers. The Ruby on Rails <a href="http://git.openstreetmap.org/?p=rails.git;a=tree;f=db/migrate;h=dca7a5320ddc04020300556d31ac46fae897ca66;hb=HEAD" rel="nofollow noreferrer">migrations</a> are ultimately the one true source for the latest schema used by the OSM servers. But you'd probably want to create a database with a similar schema using the database creation scripts bundled with the Osmosis distribution within the script/contrib directory. </p> <p>Alternatively, for some applications you might want to PostGIS enable your Postgres database (load in a load of geospatial functions and data types) and then load in OpenStreetMap data in a format which makes use of these types. You can do that with Osmosis, or osm2pgsql. See <a href="http://wiki.openstreetmap.org/wiki/PostGIS" rel="nofollow noreferrer">PostGIS</a></p> <p>Alternatively for more basic applications you might look at parsing the .osm format for yourself. An <a href="http://wiki.openstreetmap.org/wiki/.osm" rel="nofollow noreferrer">osm file</a> contains some "node" and "way" elements. Each of these can have have several "tag" elements. There's "relation" elements too. These can can be unnecessary for many applications, but it all depends what you want to do. Maybe you only need nodes (for POI data applications) For some work it may be viable to work directly with a .osm file, parsed within PHP with no database involved, although generally not for for any meaningfully large area of map data.</p> <p>You may find some useful code scattered around among the tools listed at <a href="http://wiki.openstreetmap.org/wiki/Category:PHP" rel="nofollow noreferrer">Category:PHP</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload