Search code examples
postgresqlgeospatialpostgisprotobuf-cvector-tiles

Postgis ST_AsMVT() return missing libprotobuf-c on MacOSX High Sierra


I try to get MVT format from my geometry table with this query

SELECT ST_AsMVT(q)
FROM (
        SELECT
                id_kelurahan,
                nama_kelurahan,
                ST_AsMVTGeom(
                        feature,
                        TileBBox(11, 1150, 1724, 3857),
                        4096,
                        0,
                        false
                ) geom
        FROM kelurahan
        WHERE ST_Intersects(feature, (SELECT ST_Transform(ST_MakeEnvelope(22.1484375, -76.72022329036133, 22.32421875, -76.6797849031069, 4326), 3857)))
) q

As you can see I using Postgis extension function ST_AsMVT() to convert my inner query result to MVT but instead of getting the expected result (MVT) it genereate the missing libprotobuf-c error. I'm on MacOSX High Sierra 10.13.1, Postgis version 2.4.0.

I already research the error and try some of it solutions

brew install protobuf
brew install protobuf-c

both of the process ends succesfully with no error. already restart my device but the missing libprotobuf-c error still occured.


Solution

  • Try to install postgis with this command:

    brew install postgis --with-protobuf-c

    I've encountered this problem last time and this fixed it on mac high sierra.