+ if ($sGeomType === null || $sGeomType == 'text') {
+ $this->bIncludePolygonAsText = $oParams->getBool('polygon_text');
+ }
+ if ($sGeomType === null || $sGeomType == 'geojson') {
+ $this->bIncludePolygonAsGeoJSON = $oParams->getBool('polygon_geojson');
+ }
+ if ($sGeomType === null || $sGeomType == 'kml') {
+ $this->bIncludePolygonAsKML = $oParams->getBool('polygon_kml');
+ }
+ if ($sGeomType === null || $sGeomType == 'svg') {
+ $this->bIncludePolygonAsSVG = $oParams->getBool('polygon_svg');
+ }
+ $this->fPolygonSimplificationThreshold
+ = $oParams->getFloat('polygon_threshold', 0.0);
+
+ $iWantedTypes =
+ ($this->bIncludePolygonAsText ? 1 : 0) +
+ ($this->bIncludePolygonAsGeoJSON ? 1 : 0) +
+ ($this->bIncludePolygonAsKML ? 1 : 0) +
+ ($this->bIncludePolygonAsSVG ? 1 : 0);
+ if ($iWantedTypes > CONST_PolygonOutput_MaximumTypes) {
+ if (CONST_PolygonOutput_MaximumTypes) {
+ userError('Select only '.CONST_PolygonOutput_MaximumTypes.' polgyon output option');
+ } else {
+ userError('Polygon output is disabled');
+ }
+ }