You are not logged in.

#1 2008-01-25 10:26:32

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Using OSM data in another application

Hi,
I'm developing a web application for the Forestry Research in the UK is open-source software. The basic idea is to allow the public to view forestry data and carry out some analysis. I'm looking for free map layers to include such as roads, place names or anything else that might be useful. Is it possible to use OSM data for this? If so, how? Otherwise, could anyone point me somewhere I might be able to get free data such as this?
Thanks!
Jon Britton

Offline

#2 2008-01-25 15:07:27

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

I would say: Absolutely! Providing maps and the data that they are based upon for free is the 'core business' of OpenStreetMap. OpenStreetMap provides it's data with a Creative Commons by Share Alike license. What this means to you is basically you can do what you like with the data, so long as you mention the original creator and anyone else can do the same with anything you produce. Maybe it's best if you send an email to the legal-talk mailing list if you really want to know if OpenStreetMap is suitable for your application.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#3 2008-01-25 15:31:36

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: 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

Offline

#4 2008-01-25 20:06:51

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

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.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#5 2008-01-28 12:13:20

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Offline

#6 2008-02-01 15:46:27

JRA
Member
Registered: 2007-12-17
Posts: 669

Re: Using OSM data in another application

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.

Offline

#7 2008-02-04 12:16:02

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Offline

#8 2008-02-04 12:21:25

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

What is it that doesn't work? Are you getting error messages? Please elaborate...


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#9 2008-02-04 12:58:28

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Offline

#10 2008-02-04 13:20:31

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

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


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#11 2008-02-04 13:26:58

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

Thank you very much!
Jon

Offline

#12 2008-02-04 13:55:29

artemp
Member
Registered: 2008-02-04
Posts: 2

Re: Using OSM data in another application

Jon,

You probably need to install required runtime from MS : http://www.microsoft.com/downloads/deta … laylang=en
(Look for supported platforms)

Artem

Offline

#13 2008-02-04 13:57:45

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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.

Last edited by Lambertus (2008-02-04 14:10:44)

Offline

#14 2008-02-04 14:00:36

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

Thanks, that seems to have sorted it out.

Where can I get information on running osm2psql?

Thanks again,
Jon

Offline

#15 2008-02-04 14:12:51

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

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


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#16 2008-02-04 14:26:00

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Offline

#17 2008-02-04 15:00:45

artemp
Member
Registered: 2008-02-04
Posts: 2

Re: Using OSM data in another application

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

Offline

#18 2008-02-04 15:22:01

JRA
Member
Registered: 2007-12-17
Posts: 669

Re: Using OSM data in another application

Hi,

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

Last edited by JRA (2008-02-04 15:22:28)

Offline

#19 2008-02-04 15:44:26

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

Thanks, it's worked now.

Jon

Offline

#20 2008-02-04 15:47:57

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Offline

#21 2008-02-04 17:00:31

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Using OSM data in another application

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


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#22 2008-02-05 11:42:08

Jon Britton
Member
Registered: 2008-01-25
Posts: 21

Re: Using OSM data in another application

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

Jon

Offline

Board footer

Powered by FluxBB