#707 closed defect (duplicate)
WKBReader does not read geometries with Z, M or ZM outside of Point
Reported by: | benmorel | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 3.6.1 |
Component: | Default | Version: | main |
Severity: | Critical | Keywords: | WKBReader |
Cc: | royseto |
Description
Strangely, trying to read any Geometry, apart from a Point, with Z, M or ZM coordinates from WKB always fails with a message such as:
"ParseException: Unknown WKB type 234"
An example of such geometry is the following:
LINESTRING Z (0 1 2, 1 2 3, 2 3 4)
Its (hex) WKB representation is:
01ea030000030000000000000000000000000000000000f03f0000000000000040000000000000f03f00000000000000400000000000000840000000000000004000000000000008400000000000001040
This WKB is correct, and PostGIS and others handle it properly.
I will post a pull request on GitHub with failing tests, and put the link here.
Change History (6)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
This is a duplicate of #466
The example geometry is ISO WKB. GEOS currently only supports EWKB, defined by PostGIS (however, PostGIS seamlessly supports both ISO WKB and EWKB formats).
The EWKB equivalent of the example linestring is:
0102000080030000000000000000000000000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000840000000000000004000000000000008400000000000001040
But yeah, I agree it would be nice to have GEOS catch up to the abilities of PostGIS.
comment:3 by , 10 years ago
Thanks, I did not think one second that GEOS would not be able to handle ISO WKB. I'll see if I can make changes to the WKBReader so that it can handle WKB as well: any WKB being valid EWKB, it should be possible without breaking anything.
comment:4 by , 10 years ago
Cc: | added |
---|
comment:5 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Failing tests: https://github.com/libgeos/libgeos/pull/39