remove polygon=1 (polypoints) feature

This commit is contained in:
marc tobias
2019-03-05 18:14:25 +01:00
committed by Sarah Hoffmann
parent 4c593fa859
commit 7a94872413
11 changed files with 11 additions and 178 deletions

View File

@@ -63,18 +63,6 @@ Feature: Parameters for Reverse API
| json | geotext |
| jsonv2 | geotext |
Scenario Outline: Reverse Geocoding contains polygon-as-points geometry
When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
| polygon |
| 1 |
Then result 0 has not attributes <response_attribute>
Examples:
| format | response_attribute |
| xml | polygonpoints |
| json | polygonpoints |
| jsonv2 | polygonpoints |
Scenario Outline: Reverse Geocoding contains SVG geometry
When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
| polygon_svg |
@@ -114,8 +102,8 @@ Feature: Parameters for Reverse API
Scenario Outline: Reverse Geocoding in geojson format contains no non-geojson geometry
When sending geojson reverse coordinates 47.165989816710066,9.515774846076965
| polygon_text | polygon | polygon_svg | polygon_geokml |
| 1 | 1 | 1 | 1 |
| polygon_text | polygon_svg | polygon_geokml |
| 1 | 1 | 1 |
Then result 0 has not attributes <response_attribute>
Examples:
@@ -124,4 +112,3 @@ Feature: Parameters for Reverse API
| polygonpoints |
| svg |
| geokml |

View File

@@ -55,8 +55,6 @@ Feature: Simple Reverse Tests
Examples:
| parameter | value |
| polygon | 1 |
| polygon | 0 |
| polygon_text | 1 |
| polygon_text | 0 |
| polygon_kml | 1 |

View File

@@ -303,18 +303,6 @@ Feature: Search queries
| json | geotext |
| jsonv2 | geotext |
Scenario Outline: Search result contains polygon-as-points geometry
When sending <format> search query "Highmore"
| polygon |
| 1 |
Then result has attributes <response_attribute>
Examples:
| format | response_attribute |
| xml | polygonpoints |
| json | polygonpoints |
| jsonv2 | polygonpoints |
Scenario Outline: Search result contains SVG geometry
When sending <format> search query "Highmore"
| polygon_svg |
@@ -354,8 +342,8 @@ Feature: Search queries
Scenario Outline: Search result in geojson format contains no non-geojson geometry
When sending geojson search query "Highmore"
| polygon_text | polygon | polygon_svg | polygon_geokml |
| 1 | 1 | 1 | 1 |
| polygon_text | polygon_svg | polygon_geokml |
| 1 | 1 | 1 |
Then result 0 has not attributes <response_attribute>
Examples:

View File

@@ -36,8 +36,6 @@ Feature: Simple Tests
| parameter | value |
| addressdetails | 1 |
| addressdetails | 0 |
| polygon | 1 |
| polygon | 0 |
| polygon_text | 1 |
| polygon_text | 0 |
| polygon_kml | 1 |
@@ -98,7 +96,6 @@ Feature: Simple Tests
Then result header contains
| attr | value |
| querystring | xnznxvcx |
| polygon | false |
| more_url | .*q=xnznxvcx.*format=xml |
Scenario: Empty XML search with special XML characters
@@ -106,7 +103,6 @@ Feature: Simple Tests
Then result header contains
| attr | value |
| querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
| polygon | false |
| more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
Scenario: Empty XML search with viewbox
@@ -116,7 +112,6 @@ Feature: Simple Tests
Then result header contains
| attr | value |
| querystring | xnznxvcx |
| polygon | false |
| viewbox | 12,33,77,45.13 |
Scenario: Empty XML search with viewboxlbrt
@@ -126,7 +121,6 @@ Feature: Simple Tests
Then result header contains
| attr | value |
| querystring | xnznxvcx |
| polygon | false |
| viewbox | 12,34.13,77,45 |
Scenario: Empty XML search with viewboxlbrt and viewbox
@@ -136,29 +130,8 @@ Feature: Simple Tests
Then result header contains
| attr | value |
| querystring | pub |
| polygon | false |
| viewbox | 12,33,77,45.13 |
Scenario Outline: Empty XML search with polygon values
When sending xml search query "xnznxvcx"
| param | value |
| polygon | <polyval> |
Then result header contains
| attr | value |
| polygon | <result> |
Examples:
| result | polyval |
| false | 0 |
| true | 1 |
| true | True |
| true | true |
| true | false |
| true | FALSE |
| true | yes |
| true | no |
| true | '; delete from foobar; select ' |
Scenario: Empty XML search with exluded place ids
When sending xml search query "jghrleoxsbwjer"
| exclude_place_ids |

View File

@@ -35,55 +35,6 @@ class LibTest extends \PHPUnit\Framework\TestCase
);
}
public function testGeometryText2Points()
{
$fRadius = 1;
// invalid value
$this->assertEquals(
null,
geometryText2Points('', $fRadius)
);
// POINT
$aPoints = geometryText2Points('POINT(10 20)', $fRadius);
$this->assertEquals(
101,
count($aPoints)
);
$this->assertEquals(
array(
array(10, 21),
array(10.062790519529, 20.998026728428),
array(10.125333233564, 20.992114701314)
),
array_splice($aPoints, 0, 3)
);
// POLYGON
$this->assertEquals(
array(
array('30', '10'),
array('40', '40'),
array('20', '40'),
array('10', '20'),
array('30', '10')
),
geometryText2Points('POLYGON((30 10, 40 40, 20 40, 10 20, 30 10))', $fRadius)
);
// MULTIPOLYGON
$this->assertEquals(
array(
array('30', '20'), // first polygon only
array('45', '40'),
array('10', '40'),
array('30', '20'),
),
geometryText2Points('MULTIPOLYGON(((30 20, 45 40, 10 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))', $fRadius)
);
}
public function testParseLatLon()
{
// no coordinates expected