]> git.openstreetmap.org Git - nominatim.git/commitdiff
reverse do not downgrade tiger and interpolation results
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 14 Jun 2016 19:38:03 +0000 (21:38 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 14 Jun 2016 19:38:03 +0000 (21:38 +0200)
Also fix the type that is returned for Tiger data.

Fixes #470

lib/ReverseGeocode.php

index 4eeb5cc4851e4d647614597a03660cd64de09966..d2902a59485a68a4f5d84afc2329ed30562d4d58 100644 (file)
                                                        $iPlaceID = $aPlaceLine['place_id'];
                                                        $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street
                                                        $fFraction = $aPlaceLine['fraction'];
+                                                       $iMaxRank = 30;
                                                }
                                                // else: nothing to do, take placex house from above
                                        }
                                                $iPlaceID = $aPlaceLine['place_id'];
                                                $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street
                                                $fFraction = $aPlaceLine['fraction'];
+                                               $iMaxRank = 30;
                                        }
                                }
                        }
                                        $iPlaceID = $aPlaceTiger['place_id'];
                                        $iParentPlaceID = $aPlaceTiger['parent_place_id']; // the street
                                        $fFraction = $aPlaceTiger['fraction'];
+                                       $iMaxRank = 30;
                                }
                        }
 
                                }
                        }
                        return array('place_id' => $iPlaceID,
-                                               'type' => $bPlaceIsTiger ? 'tiger' : $bPlaceIsLine ? 'interpolation' : 'osm',
+                                               'type' => $bPlaceIsTiger ? 'tiger' : ($bPlaceIsLine ? 'interpolation' : 'osm'),
                                                'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1);
                }