[postgis-devel] POINT EMPTY in WKB

Mateusz Loskot mateusz at loskot.net
Mon Dec 6 14:59:19 PST 2010


On 06/12/10 22:47, strk wrote:
> On Mon, Dec 06, 2010 at 12:30:31PM -0800, Paul Ramsey wrote:
>> On Mon, Dec 6, 2010 at 10:01 AM, Paul Ramsey <pramsey at opengeo.org> wrote:
>>
>>> A final possibility would be to hack POINT EMPTY into WKB, as
>>> something like POINT(nan nan nan) or POINT(inf inf inf) or POINT(-0 -0
>>> -0). There would be a danger there in platforms that have different
>>> interpretations of what nan, inf or -0 are in binary.
>>
>> I neglected to add a third possibility which would be to add another
>> flag to the EWKB type number to indicate the presence of an empty
>> geometry. This would also be backwards breaking since old-school EWKB
>> handlers would, even if they stripped off the high bits, receive what
>> to them was a degenerate piece of WKB (endian-int32 instead of
>> endian-int32-double-double)
> 
> Give them the double-double .. some funny HEX string :)

Each byte of double set to 0xCC or 0xCD  :-)

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org



More information about the postgis-devel mailing list