logo separator

[mkgmap-dev] [patch] add POIs to areas

From Ben Konrath ben at bagu.org on Sun Feb 22 01:23:21 GMT 2009

Hi,

A patch that will create a POI in various areas if they don't already 
have one is attached. This is very useful for me here in Costa Rica 
where most streets aren't named and addresses are given based on points 
of references like buildings, parks, etc rather than street names.

This replaces Bernhard Heibler's patch from last week which does a 
similar thing for only buildings. As with Bernhard's patch, if you want 
a POI in a given area, you have to make sure that the style system will 
create a Garmin polygon by putting a suitable line in 
resources/styles/default/polygons.

POIs are only made for areas which I thought made sense. Here is the 
code that describes the current mappings from Garmin polygon to Garmin 
point:

+                       map.put(0x04, 0x640b); // Military
+                       map.put(0x05, 0x2f0b); // Car Park
+                       map.put(0x06, 0x2f0b); // Parking Garage
+                       map.put(0x07, 0x2f04); // Airport
+                       map.put(0x08, 0x2e04); // Shopping Centre
+                       map.put(0x09, 0x2f09); // Marina
+                       map.put(0x0a, 0x6410); // University
+                       map.put(0x0b, 0x6408); // Hospital
+                       map.put(0x13, 0x6400); // Man made area
+                       map.put(0x17, 0x2c06); // City Park
+                       map.put(0x18, 0x2d05); // Golf
+                       map.put(0x19, 0x2c0a); // Sport
+                       map.put(0x1a, 0x6403); // Cemetery

Please let me know if you think something is missing or wrong here.

The patch adds a new command line argument '--add-pois-to-areas' which 
enables this feature. The only thing left to do is calculate a better 
position for the POIs - currently they are placed in the centre of the 
polygon but that doesn't work for cases like 'Museo Nacional de Costa 
Rica' as shown here:

http://openstreetmap.org/?lat=9.932949&lon=-84.071649&zoom=18&layers=B000FTF

Comments and testing are appreciated.

Cheers, Ben
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mkgmap-add-pois-to-areas.patch
Url: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090221/289623f6/attachment.pl 


More information about the mkgmap-dev mailing list