This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database: | |
# Use postgres 9.1 | |
pre: | |
- sudo service postgresql stop && sudo apt-get remove -y postgresql-9.3 && sudo apt-get update && sudo apt-get install -y postgresql-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis-2.1 | |
- sudo sed -i "s/\port = 5433/port = 5432/" /etc/postgresql/9.1/main/postgresql.conf | |
- sudo cp /etc/postgresql/9.3/main/pg_hba.conf /etc/postgresql/9.1/main/pg_hba.conf | |
- sudo service postgresql restart | |
- sudo -u postgres createuser ubuntu -d --superuser | |
- createdb circle_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import six | |
from django.contrib.gis.geos import Point | |
from haystack import indexes | |
from haystack.exceptions import SpatialError | |
from haystack.utils.geo import ensure_geometry, ensure_point | |
def ensure_multipoint(geom): | |
""" | |
Makes sure the parameter passed in looks like a GEOS ``MultiPoint``. |