Idea: LocalGeocoding API

Events happening in the community are now at Drupal community events on www.drupal.org.
patrickd's picture

It does what a geocoder has to do: Translate address information to lats and longs.

But it will do that on your own box, in your database: no request restrictions.. no dependency on a foreeign service.. location autocompletition.. ?

For shure we can't store the worlds address data like google does but we can do it local:
Using the possiblity to select and export map data from OSM (http://www.openstreetmap.org/export) and import it into our local database using it for geocoding matters.

It has assets and drawbacks; but also essential advantages for some special cases.

Comments

Updates

peterx's picture

Looks good. How do you detect updates and download only the updates? If we cannot download only updates, what will openstreetmap do when 200000 Web sites download big chunks every day?

Thats a good question, but I

patrickd's picture

Thats a good question, but I think updating it would be like updating a navigation system: the user gets reminded every month but he does it.. twice a year ?
Furthermore streets won't get build day by day, a daily update would be over the top.
Also openstreet map-nodes come with a version attribute, changes can easily be detected by comparrisson this will make it more simple.

But how can the Creative Commons licence be respected in this case ? It's an API so we can't write "powered by osm" on the right place where the osm data gets used later.
How to handle with CC in this case?

OSM has not all data

mac2000's picture

Just checked OSM services

First of all it has not all data, and what is more important not all data is translated, so probably this solution is first of all for english projects.

I prefer wikimapia.org - it has more data and it translated, it also has export abilities.

In my use case i use google geocoder to get area bounding box and retrive wikimapia data for it (via file cache) then check user selected point for intersect with wikimapia regions. In my case i get standard data as country, city, street from google geocoder and distinct and micro distinct from wikimapia.

Actually it has all data as

patrickd's picture

Actually it has all data as map-nodes (everything like country, town, street, postal). To use this for geocoding we simply have to link vectors the right way.

By testing how large the area is that you can export (XML) on osm, you will see that translations are not the problem because the area is just too small to cross two countries. It's exactly enough to export all data of berlin.
(thats why this api would give you local geocoding).

wikimapia.org looks quite nice, but eg. in my town there is not a single street named (germany), while osm already gives you very detailed information (especially in europe).

So OSM meets YOUR requirements

mac2000's picture

As I say, I have exactly opposit situation, in your case - OSM gives you all data you need, probably because users in your region actively fill OSM with proper data, but in my region - OSM gives me 1/10 of wikimapia data.

Probably it will be good to fetch data from both (or more, probably there is other projects) services and merge it...

Maybe provide a hook and let

Niklas Fiekas's picture

Maybe provide a hook and let a Wikimedia plugin and an OSM plugin inplement it.

standalone service vs Drupal.

donquixote's picture

Wouldn't it be better to have a standalone service on your box, written in python or something?
This would respond to geocoding requests, and do nothing more. No overhead with Drupal's hook_init() etc.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week