geoPHP
geoPHP copied to clipboard
exception in tests suite
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
Test suites should now be passing.
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
I've re-opened the issue.