Skip to content

Instantly share code, notes, and snippets.

Created Nov 23, 2013
What would you like to do?
If you are using and old version of django (1.4 or lower) but are installing the latest dependancies for GEO DJANGO, specifically GDAL using brew install gdal. The below maybe helpful. This is a brew recipe to install geos on macos that plays well with older django versions and avoids "django.contrib.gis.geos.error.GEOSException: Could not parse…
require 'formula'
class Geos < Formula
homepage ''
url ''
sha1 'b8aceab04dd09f4113864f2d12015231bb318e9a'
option :universal
option :cxx11
def patches
# fixes something small
def install
ENV.universal_binary if build.universal?
ENV.cxx11 if build.cxx11?
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 800a304..8cc119a 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -3311,7 +3311,7 @@ GEOSGetSRID_r(GEOSContextHandle_t extHandle, const Geometry *g)
const char* GEOSversion()
static char version[256];
- sprintf(version, "%s r%d", GEOS_CAPI_VERSION, GEOS_SVN_REVISION);
+ sprintf(version, "%s", GEOS_CAPI_VERSION);
return version;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment