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.
Note:
See TracTickets
for help on using tickets.
The result will decode into the following using mapbox decode.js:
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.