Using OSM data in another application

Thanks for the reply,
I cannot access that mailing list page because of the security restrictions where I am (it’s a goverment agency… it’s a pain). Can you data be downloaded in a common format (like shapefiles)? I’m using a GeoServer WMS to serve my data, which supports shapefiles and postgis (I’ve never used this, though). As long as one of these is possible then it’s suitable.

It’s a shame there’s no WMS available I can connect to to save my bandwidth!

Any advice would be greatly appreciated,
Thanks,
Jon

OpenStreetMap once had it’s own WMS but that is history. Our ‘product’ is an XML file called ‘the planet file’ that contains all our data for the whole world. It is exported form our database on a weekly basis and you can download it from the main site and several mirrors.

Several tools have been developed to import, convert, extract, etc. the planet file into other formats, databases, etc. You might have to develop a tool for your target format if it isn’t available yet, but you can probably reuse some of the existing tools for that which can be found in the wiki or trac so that shouldn’t be a major problem. We would appreciate it ofcourse if any new tool or improvements made to the existing tools or dataset are donated back to the community.

Thanks, I’ve found the UK PostGIS file already created.
Jon

Hi,

I run Geoserver WFS service that delivers Scandinavian OSM data from PostGIS. For loading OSM data into PostGIS I am using a very efficient utility “osm2pgsql”. Unfortunately I cannot keep my service up all the time, but feel feel free to ask more if you are interested.

Thanks for the offer but I only really need the UK data. While you mention osm2pgsql… are you running it on windows? I’ve downloaded the Windows version from http://artem.dev.openstreetmap.org/files/ and I can’t get it working. I don’t have access to anything other that Windows where I am right now.

Thanks
Jon

What is it that doesn’t work? Are you getting error messages? Please elaborate…

Ok,
If I double click the file I get the error:

“This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem”.

Trying to run it from the command prompt with no arguments I get:

D:>osm2pgsql_latest.exe
The system cannot execute the specified program.

Cheers,
Jon

I’ve forwarded your problem to the mailing list and hope that the author of osm2pgsql will be able to solve it.

Thank you very much!
Jon

Jon,

You probably need to install required runtime from MS : http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en
(Look for supported platforms)

Artem

The network here in my office does not allow me access to the mailing list (comes up as “General Email”). Could you please forward any response to me at jon.britton [at] forestry.gsi.gov.uk? Or just post it here.

Thanks,
Jon

Edit by Lambertus: Obscured email adres a bit.

Thanks, that seems to have sorted it out.

Where can I get information on running osm2psql?

Thanks again,
Jon

Some information on osm2pgsql is in the wiki and the readme.

Thanks,
How do I specify a password etc to get into my database? I’m getting:

D:>osm2pgsql_latest.exe -d postgis -m uk-080123.osm
osm2pgsql win32

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Connection to database failed: fe_sendauth: no password supplied

Error occurred, cleaning up

Can’t find any information about this and there doesn’t seem to be an argument for it.

Cheers,
Jon

You should use pgadmin3 to give yourself (your login username) enough rights (create/update/select etc) on database you’re loading data, and also enable password-less connections from localhost (TRUST option in pg_hba.conf )

HTH
Artem

Hi,

There are also some notes I wrote down here:
http://wiki.openstreetmap.org/index.php/User_talk:JRA

Thanks, it’s worked now.

Jon

Oh, one more thing… is it possible to get closed-polygon coastline data? The old uk postgis dump had coastline lines (they were in the planet_osm_polygon table but weren’t actually polygons…), and this new version I’ve just added to the database doesn’t have anything at all.

Cheers,
Jon

Coastline data is being worked on, but the quality of the data in Europe is pretty good.

Thanks,
I’ve got quite a nice map now!

Jon