<div dir="ltr">Hi devs,<div><br></div><div>I've been working on a new output format function called ST_AsGeobuf these last months. Its purpose is to serialize full query output into the binary format Geobuf containing both geometry and attributes. The implementation is tracked by:</div><div><br></div><div><a href="https://trac.osgeo.org/postgis/ticket/3599">https://trac.osgeo.org/postgis/ticket/3599</a><br></div><div><a href="https://git.osgeo.org/gogs/postgis/postgis/pulls/4">https://git.osgeo.org/gogs/postgis/postgis/pulls/4</a> or alternatively <a href="https://github.com/bjornharrtell/postgis/tree/asgeobuf5">https://github.com/bjornharrtell/postgis/tree/asgeobuf5</a><br></div><div><br></div><div>Geobuf is a binary format specified by Mapbox that can represent similar data and structure as GeoJSON but is more compact and is faster encode and decode. You can read more about Geobuf at <a href="https://github.com/mapbox/geobuf">https://github.com/mapbox/geobuf</a> which also serves as the reference implementation to decode at a browser client side.<br></div><div><br></div><div>Geobuf is in turn based on Googles protobuf standard which I think is similar to a binary XML. My implementation uses the general purpose library protobuf-c to simplify the encoding.</div><div><br></div><div>I hope to be able use this work as a base to also implement support for vector tiles as specified by Mapbox which is also based on protobuf.</div><div><br></div><div>I think the implementation is ready for review and testing. If you have any interest in Geobuf or vector tiles output support I'd appreciate review and/or test result feedback.</div><div><br></div><div>/Björn</div></div>