Opened 7 years ago

Closed 7 years ago

#3861 closed defect (wontfix)

ST_AsGeoBuf and EMPTY

Reported by: pramsey Owned by: bjornhartnell
Priority: medium Milestone: PostGIS 2.4.0
Component: postgis Version: master
Keywords: Cc:

Description

Looking over the code, it's not clear that ST_AsGeoBuf is doing the right thing with empty (or what the right thing is). The mapbox encode .js doesn't seem to have any special thinking about encoding empty, which means that probably POINT EMPTY will encode to something that is not valid and readable. It's possible that all other empties will work, since they'll have an npoints/ngeoms/etc that is written down as 0.

Change History (1)

comment:1 by Björn Harrtell, 7 years ago

Resolution: wontfix
Status: assignedclosed

The result will decode into the following using mapbox decode.js:

Error: Failed to load processor json
No macro or processor named 'json' found

The spec says geometry may have an empty coordinates array member but it's missing here. But I'd say the decoder is to blame for that and can assume that the binary is ok.

I say we close this.

Note: See TracTickets for help on using tickets.