]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Handle multipolygon geometry a little bit (return first outer ring)
[nominatim.git] / website / search.php
index 93710770e2509793e9c89b4daddefce8ee6d5184..1d544df44be50752b2da40e8d6787f8e975cfa6f 100755 (executable)
@@ -1,5 +1,4 @@
 <?php
-phpinfo();exit;
        require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
 
@@ -1221,6 +1220,10 @@ phpinfo();exit;
                                {
                                        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;