[postgis-devel] ST_AsFlatGeobuf / ST_FromFlatGeobuf ?

Björn Harrtell bjorn.harrtell at gmail.com
Wed Sep 23 00:34:49 PDT 2020


FlatGeobuf is an alternative to GeoPackage, shapefile, GML, GeoJSON and
similar simple features representations. I see it as a general purpose
serialization format between systems where direct database access is not
suitable or possible, but with a minimal performance hit.

FlatGeobuf is "cloud optimized" in that it is designed for optimal and
streaming I/O. So in a sense you could say FlatGeobuf is the equivalent of
COG for lossless vector data. This is an area where I believe GeoPackage
fails and I think it's a big drawback of that format. For example it makes
GeoPackage pretty much unusable as a WFS / OGC API output format but I
believe FlatGeobuf fits that use case perfectly.

FlatGeobuf does not intend to compete with MVT, which in my opinion is a
special purpose lossy render optimized format (which is does very well)
that is relatively expensive to create but fast to read and render.

You might be right that ST_FromFlatGeobuf does not make sense. This is why
I thought about COPY. I'm not very fond of having to resort to an external
command line tool and think ogr2ogr takes care of that well enough.

/Björn

Den tis 22 sep. 2020 10:45 <rmrodriguez at carto.com> skrev:

> Hi Bjorn, nice to see you around.
>
> I think having extra formats in Postgis is great as long as they are
> maintained (because they are used). For example, MVT turned out to be
> a great addition with lots of users.
>
> Is flatgeobuf an alternative to shapefile, to MVT, or both? Do you
> expect people to use it to extract full datasets or only parts of it
> at a time?
>
> One thing I'm not sure about is `ST_FromFlatGeobuf`. I would expect
> that to return a table/tuple, but AFAIK there is no way to change the
> output format of a function based on the input, so I think I would
> expect something like a fgb2pgsql cli and not a SQL function.
>
> Regards,
> --
> Raúl Marín Rodríguez
> carto.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20200923/029a8aa3/attachment.html>


More information about the postgis-devel mailing list