From: Brian Quinion Date: Mon, 5 Nov 2012 22:47:42 +0000 (+0000) Subject: Handle multipolygon geometry a little bit (return first outer ring) X-Git-Tag: v2.2.0~196 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/c0d9ba7e0cca0e1ec0ebd6764c5d5c871e5e443b Handle multipolygon geometry a little bit (return first outer ring) --- diff --git a/website/search.php b/website/search.php index f7187404..1d544df4 100755 --- a/website/search.php +++ b/website/search.php @@ -1220,6 +1220,10 @@ { preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/',$aMatch[1],$aPolyPoints,PREG_SET_ORDER); } + elseif (preg_match('#MULTIPOLYGON\\(\\(\\(([- 0-9.,]+)#',$aPointPolygon['outlinestring'],$aMatch)) + { + preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/',$aMatch[1],$aPolyPoints,PREG_SET_ORDER); + } elseif (preg_match('#POINT\\((-?[0-9.]+) (-?[0-9.]+)\\)#',$aPointPolygon['outlinestring'],$aMatch)) { $fRadius = 0.01;