Hello mappers,

I have some questions about this cool project, I really appreciate your help.

I spent more than two days while I’m trying to get my copy of openstreetmap data. But no luck at all. I cannot make postgresql working with postgis. also I have miss understanding of what component should I use.

What I want to do is like this:

As you can see in the above image. I want to detect land areas not streets. is it possible to this with openstreetmap data?

Another question do I can download openstreetmap data at my own machine? If yes from where can I get them? which tool do I have to use to import osm files into my db server?

Thanks in advance.

OSM data consists of lines point and polygons. Lines are used for indicating streets. So yes you can find the areas inside street blocks quite easily.

You can download OSM data in different ways.
If you need all OSM data then you can download the planet.
If you need a country or state you can download an extract or download the planet.
If you only need a city you can download from XAPI or download a country extrac or the planet.

Hi Lambertus,

Thank you for your reply, I tried to install postgresql at my machine following the instructions explained in

but I cannot get postgis working fine, something wrong with this package i cannot find lwpostgis.sql and spatial_ref_sys.sql.
in the above post they said that pgsql_simple_schema_0.6.sql is using a simple data structure and other schema will be found in scripts directory, but all the scripts in scripts directory are simple. would you please help me from where I can get the db schema? is it mandatory to have postgis?

Thanks in advance.

If there are only the streets in the OSM data then you will not get the blocks as polygons automatically. It is possible to do with some GIS program which can build polygons from the line network.
The most easy way to have a try would be to download OSM shapefiles from Geofabrik or Cloudmade, open the street data with OpenJUMP and use the “Build areas” tool. Osm2pgsql and PostGIS is more flexible but you can try them later.

Hi All,

Sorry for bothering you. but am asking you because I cannot get a starting point to start from.

Now I have downloaded germany.osm.bz2 file, and I have PostGIS,osm2pgsql and Postgresql installed and working fine. Can you tell me from where I can get the DB Schema?

I need to load germany.osm into my postgresql. can you please tell me how to do this?

After that I want to determine the polygons as I mentioned above. Would you please tell me how to do this?

Your help is highly appreciated.

Just create a new database from the PostGIS template and run osm2pgsql. Give the name of your database with -d option and osm2pgsql will do the rest for you.