Skip to content

Commit

Permalink
Fixing Travis CI bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
migurski committed Mar 13, 2013
1 parent 1339713 commit d67becb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -12,7 +12,7 @@ virtualenv:
before_install:
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update -qq
- sudo apt-get install -qq postgis gdal-bin libgdal-dev libgdal1 libgdal1-dev libpq-dev memcached python-pip python-mapnik
- sudo apt-get install -qq postgis gdal-bin libgdal-dev libgdal1 libgdal1-dev libpq-dev memcached python-pip
- sudo apt-get install -qq python-nose python-imaging python-memcache python-gdal python-coverage python-werkzeug
- ogrinfo --version
- ogrinfo --formats
Expand Down
15 changes: 10 additions & 5 deletions TileStache/Goodies/VecTiles/client.py
Expand Up @@ -38,10 +38,15 @@
from gzip import GzipFile

import logging
import mapnik

from . import mvt, geojson

try:
from mapnik import PythonDatasource, Box2d
except ImportError:
# can still build documentation
PythonDatasource = object

# earth's diameter in meters
diameter = 2 * pi * 6378137

Expand Down Expand Up @@ -146,7 +151,7 @@ def load_tile_features(lock, host, port, path_fmt, tiles, features):
logging.debug('%d features in %s:%d%s' % (len(file_features), host, port, path))
features.extend(file_features)

class Datasource (mapnik.PythonDatasource):
class Datasource (PythonDatasource):
''' Mapnik datasource to read tiled vector data in GeoJSON or MVT formats.
Sample usage in Mapnik configuration XML:
Expand Down Expand Up @@ -180,8 +185,8 @@ def __init__(self, template):
self.path = self.path.replace('{X}', '{x}').replace('{x}', '%(x)d')
self.path = self.path.replace('{Y}', '{y}').replace('{y}', '%(y)d')

bbox = mapnik.Box2d(-diameter/2, -diameter/2, diameter/2, diameter/2)
mapnik.PythonDatasource.__init__(self, envelope=bbox)
bbox = Box2d(-diameter/2, -diameter/2, diameter/2, diameter/2)
PythonDatasource.__init__(self, envelope=bbox)

def features(self, query):
'''
Expand All @@ -199,4 +204,4 @@ def features(self, query):
keys = [set(prop.keys()) for prop in props]
keys = reduce(lambda a, b: a & b, keys)

return mapnik.PythonDatasource.wkb_features(keys=keys, features=features)
return PythonDatasource.wkb_features(keys=keys, features=features)

0 comments on commit d67becb

Please sign in to comment.