[OSM-dev] Smallest possible package for OSM API

Kenn Sebesta kenn at wifi-bourgogne.com
Thu Feb 12 15:56:11 GMT 2009


Hi--

(I posted something similar tothe forum,
http://forum.openstreetmap.org/viewtopic.php?id=2444. A reply
suggested I try here, too.)

I am a controls researcher at the University of Luxembourg, and am
trying to incorporate map data into a research project on fuel economy
optimization. Our needs are actually quite simple, so I'm hoping to be
able to sandwich everything into a tiny, low-cost (emphasis on
low-cost) package.

We need to:

1) Identify *all* roads within a certain neighborhood (e.g. radius) of
a given location
2) Identify which of the above roads intersect
3) Do all this automatically, from some kind of C, Java, Fortran, etc.
program that can run on a microcontroller or DSP
4) Run this locally, without a data connection
5) It must be open source, or at least have a free license.

We don't need to:

1) write data. Read-only is all we're looking for
2) efficiently access large data sets (a 100mx15m bounding box should be enough)
3) access POI or anything else other than roads.
4) create routes

Playing around with the OSM API, it seems to me that it should work
for most, if not all, of these needs. I am able to download an XML
file containing all OSM data in a given bounding box. Looking at this
data, I see that there are <nd reference=...> sections they list the
intersections with other roads and sections. Perhaps I should think of
these more as nodes than intersections, but I haven't gotten that far
yet in understanding what the results mean. In any case, it seems to
me logical that I should be able to find connecting roads. (Please
correct me if I'm wrong!) Once I have the connecting roads, I should
be able to retrieve the associated nodes and calculate 2D layout and
positions of the roads.

As I gather from the wiki, I can even download the entire planet.osm
file along with the API, so I don't see what would prevent me from
writing a C program, shell script, etc... that automates this process.

So, assuming that the above is all correct, and that OSM API fulfills
my needs, what is the smallest platform I can run it on? Speed and
efficiency are not important, only cost and size. Is there any
provision for an ultra-light read-only API that can be included in a C
program? Given the marginal requirements, in a sense I can't see why a
small 8-bit microcontroller shouldn't be able to perform a database
lookup. Perhaps I'm thinking at this the wrong way, though, as I'm
very new to OSM, GIS, databases, etc...

If any of you have experience getting this to run on an embedded
platform, and could link to code and/or websites, that would be a
bonus!

Cheers,
Kenn Sebesta




More information about the dev mailing list