Getting Started Developing With OpenStreetMap Data 39
Nerval's Lobster writes In 2004, Steve Coast set up OpenStreetMap (OSM) in the U.K. It subsequently spread worldwide, powered by a combination of donations and volunteers willing to do ground surveys with tools such as handheld GPS units, notebooks, and digital cameras. JavaScript libraries and plugins for WordPress, Django and other content-management systems allow users to display their own maps. But how do you actually develop for the platform? Osmcode.org is a good place to start, home to the Osmium library (libosmium). Fetch and build Libosmium; on Linux/Unix systems there are a fair number of dependencies that you'll need as well; these are listed within the links. If you prefer JavaScript or Python, there are bindings for those. As an alternative for Java developers, there's Osmosis, which is a command-line application for processing OSM data.
Re: (Score:2)
this site also used to have technical stories. like this one. so its actually a welcome change from "what would benet..." series.
Re: (Score:2)
The 70's called looking for it...
Yeah, I often misplace things 40 years in the future, or more sometimes! You know how it is, it's a busy day, my mind is somewhere else, and poof! I can't find my command line application. So I just look up the number for every year in the future and start calling. I've called a lot over the years. If someone told you the 80s called and want something back, I'm sorry for bothering you.
Nice to see a story about Technology (Score:3)
And actually hacking. I think I may give this a try.
Re: (Score:2)
'THINK' 'MAY' 'TRY
vs
'AM' 'GOING TO' 'NOW'
I am I going to give this a now?
Re: (Score:2)
The power of linguistic equivocation:
'THINK' 'MAY' 'TRY
vs
'AM' 'GOING TO' 'NOW'
Does anyone think he's going to do anything?
I see why you made the effort to post anonymously
Re: (Score:3)
Work in the right direction (Score:5, Informative)
For a project I'm working on, I started to play around with the OpenStreetMap data as a source for locations (from a guy who's never used GIS info systems), so I think I'd be a good insight into getting started with using this great resource.
Notes:
- I develop in Java mostly, but I have a generally well rounded skill set.
Firstly, I had to make the jump to Postgress and PostGIS, which are annoying to setup if you're not familiar with them. I had a MySQL instance running, but for the life of me, I couldn't get osmosis to import before getting the setup just right, which unfortunately wasnt' as simple and stright forward as I'd have liked to see in any docs. So after finally banging PostGIS over the head enough to accept the import, I was hit with a huge knowledge gap on how to actually access spatial and hstore based data. Admittedly, once you get the handle of them, the SQL access the data is quite expressive and powerful.
For DB imports, I used Osmosis for data import. I couldn't find any stand-alone Java based libaries for actually using the DB data which would help a lot (maybe I'll end up writing an open source one if it doesn't already exist). So, I basically dropped down to writing PostGIS based SQL queries, which is really quite expressive and well structured when the data is good (depends on the world region, mostly good for North America from what I found so far).
Secondly, there was the OpenStreetMap data itself. As someone who primarily wants to work on geographic barriers and political boundaries, there's a big disconnect between the polygons of the system and the political ones. Generally, there's always a node (think of a pin on a map) to represent a proper place name (New york city for instance) and a polygon that encompass what New York's political boundaries are, but quite often there won't be explicit ties between the two, so you're left with bridging the two yourself constructing queries for where nodes are within city / state / country / etc.. Anyways, thats as far as I've gotten so far, so good luck!
Some links that helped me:
http://www.postgresql.org/docs... [postgresql.org]
http://postgis.net/docs/manual... [postgis.net]
http://wiki.openstreetmap.org/... [openstreetmap.org] (Make sure to read carefully, becase its rather unforgiving and terse about bad environment setups)
Re: (Score:2)
wouldn't those place properties be usually grouped by a relation like this one ?
http://wiki.openstreetmap.org/... [openstreetmap.org]
Re: (Score:2)
Yeah, relations capture the net of the geographic region, but I find the individual node's contain better hierarical town/region/state/country layering which was more correct (at least in Canada where my test data was running against). Politically based relations are great when they exist, but far too often you'd have a relation representing X but no explicit connection besides the fact that the node was geographically found in the region. You may have a relation, but you often don't have relations that poi
Re: (Score:2)
Sounds like we have gone through similar. I too am working on a project and had to take a 'detour' while I learned about GIS. Also ending up with PostGIS, osm2pgsql and huge scads of time looking around the OSM data trying to work out route data & relations.
It's been a taxing ride, but I think I have what I need from the GIS side of things now and can get back to the main part of the app. GIS is a tricky subject field and learning which areas you need to learn is a daunting task in itself when you are a
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
Their bus stops are all out of date for where I live
its very easy to go in and update them. So you can't blame anyone else but yourself for failing to help yourself with a resource someone else provided to you for free.
Re: (Score:1)
What, this is free? Then I must be the product. Yuck. Screw this scam.
you are the product? (Score:1)
Re: (Score:1)
An easier thing is to simply report a problem with the data. There's a neat feature on OpenStreetMap.org called "notes" to let you do this. Read about it here http://wiki.openstreetmap.org/... [openstreetmap.org] Maybe some active OpenStreetmap community folks will spot this and resolve the problem.
An even easier thing is
Re: (Score:2)
I was referring the OP to it. I have updated OSM data for my local area when I found it was lacking absolutely vital information on the location of the local pubs. I also helped my work colleague fix a road section as it wasn't giving him the correct satnav details for his drive home.
OSM is awesome because I can do these things. Its not difficult to do either, just enough of an impediment to deter those who might want to deface the data.
GIS Developers (Score:1)
As a developer of GIS systems you can earn very good money indeed. Why would anyone want to do it for free?
Pi (Score:2)
Re: (Score:3)
Why are you trying to represent an irrational number with a rational number of unnecessarily limited precision? If pi isn't defined as a constant in whatever language you're using, calculate it yourself and store it in a variable for future reference. 4*atan(1) is fairly common and simple for this purpose, and you'll get as many digits as the underlying datatype will support.
OSM viewing widget. (Score:2)
OSM for practical navigation (Score:2)
Re: (Score:2)
Google appears so overwhelmingly better at handling all of those complex mapping scenarios to the point where OSM can't be seriously considered for people trying to use it to navigate that city.
Interestingly, for one of my favourite mapping application -- establishing coastal sea-kayaking routes -- Google Maps is worse than useless. Google fuzzes out the offshore regions, leaving large blank areas where I know that islands/archipelagos exist. OSM does not do this, making it a much better tool for the job.
Re: (Score:1)
NYC MTA developer resources link: http://web.mta.info/developers... [mta.info]