# kartograph/kartograph.py

fixed graticule (again)

1 parent f1fa98f commit 5461330a61a2e19095b6c10e2c6a5fc9a1caa439 gka committed Mar 22, 2012
Showing with 9 additions and 7 deletions.
1. +7 −5 kartograph/layersource/special/graticule.py
2. +1 −1 kartograph/proj/azimuthal/__init__.py
3. +1 −1 setup.py
12 kartograph/layersource/special/graticule.py
 @@ -1,6 +1,7 @@ from kartograph.geometry import Line, Feature from kartograph.layersource.layersource import LayerSource +from kartograph.proj.azimuthal import Azimuthal class GraticuleLayer(LayerSource): @@ -32,11 +33,12 @@ def xfrange(start, stop, step): for lon in xfrange(-180, 181, 0.5): if lon < minLon or lon > maxLon: continue - lon += proj.lon0 - if lon < -180: - lon += 360 - if lon > 180: - lon -= 360 + if isinstance(proj, Azimuthal): + lon += proj.lon0 + if lon < -180: + lon += 360 + if lon > 180: + lon -= 360 if proj._visible(lon, lat): pts.append((lon, lat)) if len(pts) > 1:
2 kartograph/proj/azimuthal/__init__.py
 @@ -16,7 +16,7 @@ along with this program. If not, see . """ - +from azimuthal import Azimuthal from ortho import Orthographic from laea import LAEA from stereo import Stereographic
2 setup.py
 @@ -7,7 +7,7 @@ setup( name='kartograph.py', - version='0.1.5', + version='0.1.6', description="Open Source Python library for generating semantic SVG maps", long_description=long_desc, classifiers=[