geoPHP icon indicating copy to clipboard operation
geoPHP copied to clipboard

exception in tests suite

Open ramunasd opened this issue 13 years ago • 3 comments

c5f8c9eaaf0430381af41e707026114b3e6d0d22

---- Testing route.gpx
---- Testing short.geohash
---- Testing simple_point.json
---- Testing track.gpx
PHP Fatal error:  Uncaught exception 'Exception' with message 'IllegalArgumentException: Empty Points cannot be represented in WKB' in /home/ramunas/src/geoPHP/geoPHP.inc:135
Stack trace:
#0 /home/ramunas/src/geoPHP/geoPHP.inc(135): GEOSWKBWriter->writeHEX(Object(GEOSGeometry))
#1 /home/ramunas/src/geoPHP/lib/geometry/Collection.class.php(49): geoPHP::geosToGeometry(Object(GEOSGeometry))
#2 /home/ramunas/src/geoPHP/tests/test.php(43): Collection->centroid()
#3 /home/ramunas/src/geoPHP/tests/test.php(29): test_geometry(Object(LineString))
#4 /home/ramunas/src/geoPHP/tests/test.php(4): run_test()
#5 {main}
  thrown in /home/ramunas/src/geoPHP/geoPHP.inc on line 135

Fatal error: Uncaught exception 'Exception' with message 'IllegalArgumentException: Empty Points cannot be represented in WKB' in /home/ramunas/src/geoPHP/geoPHP.inc:135
Stack trace:
#0 /home/ramunas/src/geoPHP/geoPHP.inc(135): GEOSWKBWriter->writeHEX(Object(GEOSGeometry))
#1 /home/ramunas/src/geoPHP/lib/geometry/Collection.class.php(49): geoPHP::geosToGeometry(Object(GEOSGeometry))
#2 /home/ramunas/src/geoPHP/tests/test.php(43): Collection->centroid()
#3 /home/ramunas/src/geoPHP/tests/test.php(29): test_geometry(Object(LineString))
#4 /home/ramunas/src/geoPHP/tests/test.php(4): run_test()
#5 {main}
  thrown in /home/ramunas/src/geoPHP/geoPHP.inc on line 135

ramunasd avatar Jan 06 '13 12:01 ramunasd

Test suites should now be passing.

phayes avatar Dec 02 '14 06:12 phayes

Hi, i know this issue is already closed but it is still present when GEOS is installed.

GEOS is installed.
---- Testing 20120702.gpx
---- Testing an_empty_polygon.wkt
Empty output on gpx
Empty output on geohash
---- Testing barret_spur.gpx
---- Testing big_n_ugly.kml
Empty output on geohash
---- Testing box.georss
format not detected
---- Testing cdata.kml
---- Testing circle.georss
format not detected
---- Testing empty_point.wkt
PHP Fatal error:  Uncaught exception 'Exception' with message 'IllegalArgumentException: Empty Points cannot be represented in WKB' in /root/geoPHP/geoPHP.inc:135
Stack trace:
#0 /root/geoPHP/geoPHP.inc(135): GEOSWKBWriter->writeHEX(Object(GEOSGeometry))
#1 /root/geoPHP/lib/adapters/WKT.class.php(38): geoPHP::geosToGeometry(Object(GEOSGeometry))
#2 [internal function]: WKT->read('POINT EMPTY')
#3 /root/geoPHP/geoPHP.inc(78): call_user_func_array(Array, Array)
#4 /root/geoPHP/tests/test.php(33): geoPHP::load('POINT EMPTY', 'wkt')
#5 /root/geoPHP/tests/test.php(5): run_test()
#6 {main}
  thrown in /root/geoPHP/geoPHP.inc on line 135

When I remove GEOS form php it is OK.

GEOS is not installed.
---- Testing 20120702.gpx
---- Testing an_empty_polygon.wkt
Empty output on gpx
Empty output on geohash
---- Testing barret_spur.gpx
---- Testing big_n_ugly.kml
Empty output on geohash
---- Testing box.georss
format not detected
---- Testing cdata.kml
---- Testing circle.georss
format not detected
---- Testing empty_point.wkt
Empty output on gpx
Empty output on geohash
---- Testing fells_loop.gpx
...

Running it as GEOPHP_RUN_TESTS=1 php ./test.php

Installed geos version is 3.5.0

PavelD avatar Mar 31 '16 20:03 PavelD

I've re-opened the issue.

phayes avatar Mar 31 '16 22:03 phayes