7

I am new to the field of GIS and am trying to view source tags in OSM. I have downloaded the shapefiles from http://downloads.cloudmade.com and have loaded them into Postgres. When I view the data, I am unable to see any tagging data. Should I be following a different process or using shapefiles at all?

2
  • You don't explain what tool you have used to import the shapefiles into Postgres (sometimes they omit fields except the strictly necessary ones) and you also forget to mention with what tool you view them.
    – mrg
    Aug 28, 2011 at 10:16
  • I have used Postgis shapefile loader in pgAdminIII. I have simply viewed them in pgAdmin as well be right clicking on the table name and viewing the data.
    – nix
    Aug 28, 2011 at 10:19

3 Answers 3

5

Download the OSM files (in .osm format) and import using osm2pgsql.

When using osm2pgsql, there's a file called default.style that allows you to control which OSM feature goes into which postgresql table, e.g.:

way        boundary     text         polygon
node,way   railway      text         linear

means that

  • features tagged "boundary" go into the *planet_osm_polygon* table
  • features tagged "railway" go into the *planet_osm_point* and *planet_osm_line* because the "railway" tag is common between railway stations (osm nodes) and railway tracks (osm ways).
4

It looks like the Cloudmade (and Geofabrik) shapefiles only have a minimum number of tags included. The free-form nature of tagging in OSM doesn't transfer to the shapefile format very easily.

You might want to consider a setting up a database if you want to use OSM data very extensively. OSM Stack Overflow suggests:

It's also possible to create PostGIS databases of OpenStreetMap data using either osm2pgsql or Osmosis, which will give you greater control over the types of features included, but is a more complicated procedure.

0

Shapefile on cloudmade server are final data made from osm data. If you want to get raw data (ie with osm tags) you need to download osm files.

You can find some information about how import osm files into PostGIS here: http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu

Hope it helps.

Y.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.