Opened 7 years ago

Closed 7 years ago

#3990 closed defect (fixed)

ST_AsMVTGeom fails on OS X (and Heroku)

Reported by: tyrauber Owned by: pramsey
Priority: medium Milestone: PostGIS 2.4.3
Component: postgis Version: 2.4.x
Keywords: Cc:

Description

ST_AsMVT and ST_AsMVTGeom look like good additions to PostGis. Unfortunately, ST_AsMVTGeom fails on both OSX and heroku.

On OS X I upgraded postgres and postgis using brew and installed protobuf-c.

Running the documentation query:

SELECT ST_AsMVT(q, 'test', 4096, 'geom') FROM (SELECT 1 AS c1,
    ST_AsMVTGeom(ST_GeomFromText('POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))'),
    ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom) AS q;

Results in the error.

ERROR: Missing libprotobuf-c

The same error is seen on Heroku.

OS X Platform version:

# psql (10.1) # POSTGIS="2.4.2 r16113" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 1.11.5, released 2016/07/01" LIBXML="2.9.7" LIBJSON="0.12.1” RASTER $ libprotoc 2.6.0

Heroku:

# psql (10.1) # POSTGIS="2.4.2 r16113" PGSQL="100" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99" RASTER

Change History (3)

comment:1 by pramsey, 7 years ago

This is a packaging issue, you'll have to file this w/ the brew project for OSX and I-do-not-know-who for Heroku. Basically it just looks like they compiled —without-protobuf.

comment:2 by tyrauber, 7 years ago

Ah, thank you very much. Looks like the homebrew formula defaults to compiling without protobuf:

https://github.com/Homebrew/homebrew-core/pull/22801

Just needed to do the following:

brew install postgis —with-protobuf-c

I am sure on Heroku it is something similar.

comment:3 by tyrauber, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.