Skip to content

Compile PostGIS with protobuf-c support #135

@lopezjurip

Description

@lopezjurip

Feature request

Is your feature request related to a problem? Please describe.

I'm trying to create and endpoint as an RPC function that returns a TileJSON response and looks like PostgREST supports binary responses: https://postgrest.org/en/stable/api.html?highlight=bytea#binary-output.

PostGIS has some functions that enables doing so, these are: ST_AsMVT and ST_AsMVTGeom. PostGIS requires to be compiled with protobuf support. Unfortunately supabase's extension has disabled protobuf

cmd: "./configure --without-protobuf --with-sfcgal"

Describe the solution you'd like

Removing the --without-protobuf flag from /postgres/ansible/tasks/postgres-extensions/01-postgis.yml

Describe alternatives you've considered

I have tried to return geometry and jsonb responses instead of protobuf binaries with ST_AsMVTGeom but is not possible because for ST_AsMVTGeom to execute it needs protobuf support.

Additional context

This example query fails:

SELECT ST_AsText(ST_AsMVTGeom(
	ST_GeomFromText('POLYGON ((0 0, 10 0, 10 5, 0 -5, 0 0))'),
	ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)),
	4096, 0, false));

https://postgis.net/docs/ST_AsMVTGeom.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions