]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Add polygon simplification
[nominatim.git] / website / search.php
index a9e20d4eb47e564fa4889b42312869ecd8b3462e..ecf584ae97500d4d5f9a4f8368bb5c96029ad90c 100755 (executable)
@@ -44,6 +44,8 @@
                $bAsKML = (boolean)isset($_GET['polygon_kml']) && $_GET['polygon_kml'];
                $bAsSVG = (boolean)isset($_GET['polygon_svg']) && $_GET['polygon_svg'];
                $bAsText = (boolean)isset($_GET['polygon_text']) && $_GET['polygon_text'];
+               $fThreshold = 0.0;
+               if (isset($_GET['polygon_threshold'])) $fThreshold = (float)$_GET['polygon_threshold'];
                if ( ( ($bAsGeoJSON?1:0)
                     + ($bAsKML?1:0)
                     + ($bAsSVG?1:0)
@@ -66,6 +68,7 @@
                $oGeocode->setIncludePolygonAsGeoJSON($bAsGeoJSON);
                $oGeocode->setIncludePolygonAsKML($bAsKML);
                $oGeocode->setIncludePolygonAsSVG($bAsSVG);
+               $oGeocode->setPolygonSimplificationThreshold($fThreshold);
        }
 
        $oGeocode->loadParamArray($_GET);