[Geocoding] nominatim address interpolation

Michal Palenik michal.palenik at freemap.sk
Thu May 20 23:01:43 BST 2010


hello

i'm starting to use address interpolation in nominatim (after commenting
out 2 lines  INSERT INTO search_name values (NEW.place_id ...) its working very nice

according to 
http://wiki.openstreetmap.org/wiki/Key:addr#Using_interpolation
interpolation tag can be even/odd/all/alphabetic/number


of this only even, odd and all are implemented in gazetteer

number: 1 is equivalent to 'all', 2 is to even/odd, 3..n should change
stepsize to number 

alphabetic: should make sequence like (1,) 1A, 1B, 1C, ... 1Z (the first 1 is
optional, it is unclear what to do after Z)



patch to make '2' work:(just two lines, tested)

gazetteer-functions.sql 
1342c1342
<   IF interpolationtype = 'odd' OR interpolationtype = 'even' OR
interpolationtype = 'all' THEN
---
>   IF interpolationtype = 'odd' OR interpolationtype = 'even' OR
   interpolationtype = 'all' or interpolationtype = '2' THEN
1397c1397
<                 IF (interpolationtype = 'odd' OR interpolationtype= 'even') THEN
---
>                 IF (interpolationtype = 'odd' OR interpolationtype
>                 = 'even' OR interpolationtype = '2') THEN

(sorry that the mail corrupts patch, just add extra test for '2' where
is a test for even/odd in gazetteer-functions.sql)

however i'm unsure how to test numeric values in postgis...


michal
-- 
michal palenik
www.freemap.sk
http://wiki.freemap.sk




More information about the Geocoding mailing list