From c0d9ba7e0cca0e1ec0ebd6764c5d5c871e5e443b Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Mon, 5 Nov 2012 22:47:42 +0000 Subject: [PATCH] Handle multipolygon geometry a little bit (return first outer ring) --- website/search.php | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5