Skip to content

AfESG/heroku-geo-buildpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Heroku buildpack: geo

This is a Heroku buildpack that vendors main geo/gis libraries like geos, proj and gdal.

You will use this buildpack with other major buildpack such as Ruby buildpack.

Usage

Example usage:

$ heroku buildpacks:set https://github.com/cyberdelia/heroku-geo-buildpack.git
$ heroku buildpacks:add heroku/ruby

Run heroku buildpacks to make sure that heroku-geo-buildpack is added before the language buildpacks.

$ heroku buildpacks
=== sushi Buildpack URLs
1. https://github.com/cyberdelia/heroku-geo-buildpack.git
2. heroku/ruby

Updating

Binaries for geos, gdal and proj are build on the appropriate heroku stack image using Docker & pushed to a public S3 bucket.

To update or rebuild these:

  • Set the versions and stack environment in support/docker-compose.yml
  • Set the AWS keys to ones with permission to push to the selected S3 bucket
    • These values can be set in support/.env
  • If updating the stack, also update it in support/Dockerfile
  • Make sure you've deleted any cached heroku docker images
  • Build with cd support && sudo docker-compose run
  • Wait 20 minutes, and check the contents of the relevant stack folder on S3

Testing

For Geo Django:

>>> from django.contrib.gis import gdal
>>> gdal.HAS_GDAL
True

For rgeo:

>>> require 'rgeo'
>>> RGeo::CoordSys::Proj4.supported?
=> true
>>> RGeo::Geos.supported?
=> true
rails r "require 'rgeo'; puts RGeo::Geos.supported?"

About

Geo libraries for Heroku

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 95.3%
  • Dockerfile 4.7%