Opened 14 years ago
Closed 14 years ago
#746 closed defect (fixed)
ST_Dump with GSerialized POINT EMPTY and EWKT/AsText mismatch?
Reported by: | robe | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
You might know about this one already since I recall you saying you were having issues with dump.
SELECT ST_Dump(ST_GeomFromText('POINT EMPTY',4326))
On non-gserialized returns empty record set as I would expect.
On gserialized gives error: ERROR: WKB structure does not match expected size!
I wonder if this is related to the fact that I can't get a POINT EMPTY back EVER - this is the case with both gserialized and non-gserialized installs.
SELECT ST_AsEWKT(ST_GeomFromEWKT('POINT EMPTY'));
Gives: MULTIPOINT EMPTY
A little bizarre if you's ask me.
Change History (5)
comment:1 by , 14 years ago
Summary: | ST_Dump with GSerialized POINT EMPTY does not match expected size → ST_Dump with GSerialized POINT EMPTY and EWKT/AsText mismatch? |
---|
comment:2 by , 14 years ago
Somehow AsEWK must be passing through the WKB handler which can't work with POINT EMPTY. Something to fix.
comment:4 by , 14 years ago
A deeper question is what the right answer to the ST_Dump() question is. Try the following:
SELECT ST_Dump(ST_GeomFromText('POINT EMPTY',4326)); SELECT ST_Dump(ST_GeomFromText('LINESTRING EMPTY',4326)); SELECT ST_Dump(ST_GeomFromText('MULTILINESTRING EMPTY',4326)); SELECT ST_Dump(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326));
Try the final one in PostGIS 1.5 too. That seems to indicate the "right" answer for ST_Dump(empty) is "no records".
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed (to my mind) at r7436 in trunk
Okay I stand corrected. Evidentally you can get back a POINT EMPTY in gserialized if you use ST_AsText, but not if you use ST_AsEWKT. There is a big disconnect there.
Example: SELECT ST_AsText(ST_GeomFromText('POINT EMPTY')); — gserialized POINT EMPTY
— out current install (not gserialized) MULTIPOINT EMPTY
If you use ST_AsEWKT in both cases its
MULTIPOINT EMPTY
This AsEWKT/AsText mismatch in GSerialized may explain the large number of discrepancies I'm seeing between the two during my regress checks.