Skip to content

Commit

Permalink
LocationSet now responds to len
Browse files Browse the repository at this point in the history
  • Loading branch information
sevberg committed Jul 18, 2018
1 parent fb9a3de commit 67bc91c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions geokit/core/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def __init__(s, locations, srs=4326, _skip_check=False):
s._bounds4326 = None
s.count = len(s._locations)

def __len__(s): return s.count
def __getitem__(s,i): return s._locations[i]
def __repr__(s):
out = " , Lon , Lat\n"
Expand Down

0 comments on commit 67bc91c

Please sign in to comment.