[geos-commits] r3025 - trunk/php/test
svn_geos at osgeo.org
svn_geos at osgeo.org
Sat Jun 19 09:27:10 EDT 2010
Author: strk
Date: 2010-06-19 13:27:10 +0000 (Sat, 19 Jun 2010)
New Revision: 3025
Modified:
trunk/php/test/test.php
Log:
Test typed empty geoms too for IO
Modified: trunk/php/test/test.php
===================================================================
--- trunk/php/test/test.php 2010-06-19 13:17:49 UTC (rev 3024)
+++ trunk/php/test/test.php 2010-06-19 13:27:10 UTC (rev 3025)
@@ -28,23 +28,33 @@
/* Good WKT */
$geom = $reader->read('POINT(0 0)');
$this->assertNotNull($geom);
+ $geom = $reader->read('POINT EMPTY');
+ $this->assertNotNull($geom);
$geom = $reader->read('MULTIPOINT(0 0 1, 2 3 4)');
$this->assertNotNull($geom);
$geom = $reader->read('MULTIPOINT((0 0), (2 3))');
$this->assertNotNull($geom);
+ $geom = $reader->read('MULTIPOINT EMPTY');
+ $this->assertNotNull($geom);
$geom = $reader->read('LINESTRING(0 0 1, 2 3 4)');
$this->assertNotNull($geom);
+ $geom = $reader->read('LINESTRING EMPTY');
+ $this->assertNotNull($geom);
$geom = $reader->read('MULTILINESTRING((0 0 1, 2 3 4),
(10 10 2, 3 4 5))');
$this->assertNotNull($geom);
$geom = $reader->read('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))');
$this->assertNotNull($geom);
+ $geom = $reader->read('POLYGON EMPTY');
+ $this->assertNotNull($geom);
$geom = $reader->read('MULTIPOLYGON(
((0 0, 1 0, 1 1, 0 1, 0 0)),
((10 10, 10 14, 14 14, 14 10, 10 10),
(11 11, 11 12, 12 12, 12 11, 11 11))
)');
$this->assertNotNull($geom);
+ $geom = $reader->read('MULTIPOLYGON EMPTY');
+ $this->assertNotNull($geom);
$geom = $reader->read('GEOMETRYCOLLECTION(
MULTIPOLYGON(
((0 0, 1 0, 1 1, 0 1, 0 0)),
@@ -58,6 +68,8 @@
POINT(9 0)
)');
$this->assertNotNull($geom);
+ $geom = $reader->read('GEOMETRYCOLLECTION EMPTY');
+ $this->assertNotNull($geom);
/* BOGUS WKT */
try {
@@ -117,12 +129,19 @@
$w->setTrim(TRUE);
$in[] = 'POINT (0 0)';
+ $in[] = 'POINT EMPTY';
$in[] = 'MULTIPOINT (0 1, 2 3)';
+ $in[] = 'MULTIPOINT EMPTY';
$in[] = 'LINESTRING (0 0, 2 3)';
+ $in[] = 'LINESTRING EMPTY';
$in[] = 'MULTILINESTRING ((0 1, 2 3), (10 10, 3 4))';
+ $in[] = 'MULTILINESTRING EMPTY';
$in[] = 'POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))';
+ $in[] = 'POLYGON EMPTY';
$in[] = 'MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((10 10, 10 14, 14 14, 14 10, 10 10), (11 11, 11 12, 12 12, 12 11, 11 11)))';
+ $in[] = 'MULTIPOLYGON EMPTY';
$in[] = 'GEOMETRYCOLLECTION (MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((10 10, 10 14, 14 14, 14 10, 10 10), (11 11, 11 12, 12 12, 12 11, 11 11))), POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)), MULTILINESTRING ((0 0, 2 3), (10 10, 3 4)), LINESTRING (0 0, 2 3), MULTIPOINT (0 0, 2 3), POINT (9 0))';
+ $in[] = 'GEOMETRYCOLLECTION EMPTY';
foreach ($in as $i) {
$this->assertEquals($i, $w->write($r->read($i)));
More information about the geos-commits
mailing list