Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Small change and removal of pypy from Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
geowurster committed Mar 11, 2015
1 parent 925fcfc commit 2f7108d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ python:
- "2.7"
- "3.3"
- "3.4"
- pypy

before_install:
- sudo add-apt-repository -y ppa:ubuntugis/ppa
Expand Down
5 changes: 4 additions & 1 deletion gj2ascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,13 @@ def main(infile, outfile, width, layer_name, render_all, fill, value, all_touche
x_min, y_min, x_max, y_max = _geom.bounds

# Compute output height and cell size
# Some line and point datasources could yield a situation where the height is 0. Check and adjust.
x_delta = x_max - x_min
y_delta = y_max - y_min
cell_size = x_delta / width
height = int(y_delta / cell_size) + 1
height = int(y_delta / cell_size)
if height is 0:
height += 1
transform = affine.Affine.from_gdal(*(x_min, cell_size, 0.0, y_max, 0.0, -cell_size))

# If rending all then the geometries are already wrapped in a generator
Expand Down

0 comments on commit 2f7108d

Please sign in to comment.