mirror of
https://github.com/php-win-ext/geospatial.git
synced 2026-03-24 09:02:16 +01:00
15 lines
396 B
PHP
15 lines
396 B
PHP
--TEST--
|
|
Test for issue #16: Segfault on rdp_simplify for GeoJSON
|
|
--FILE--
|
|
<?php
|
|
$geojson = json_decode('{"type":"LineString","coordinates":[[0,0],[1,0],[2,0],[2,1],[2,2],[1,2],[0,2],[0,1],[0,0]]}', true);
|
|
|
|
try {
|
|
var_dump(rdp_simplify($geojson, 1));
|
|
} catch ( InvalidArgumentException $e ) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Expected a coordinate pair as an array, but string given
|