Skip to content

Commit

Permalink
PLD: only require 2 values in geometry for lat and lng
Browse files Browse the repository at this point in the history
  • Loading branch information
pld committed Jan 22, 2014
1 parent f59a21f commit 856f057
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions onadata/apps/odk_logger/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,10 @@ def _set_geom(self):

if len(geo_xpaths):
for xpath in geo_xpaths:
# TODO store the altitude and precision
geometry = [float(s) for s in doc.get(xpath, u'').split()]

if len(geometry):
lat, lng, alt, precision = geometry
lat, lng = geometry[0:2]
points.append(Point(lng, lat))

self.geom = GeometryCollection(points)
Expand Down

0 comments on commit 856f057

Please sign in to comment.