diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-08-09 11:58:54 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-08-09 11:58:54 +0100 |
| commit | b058cfc85fd8770c0ef20bb6f976fb5b33e90a57 (patch) | |
| tree | 6f01683b11197bdfa5ab55f40c35c53489683a5b | |
| parent | d658ce2496999ea5a38a4691f7a21e937cbed825 (diff) | |
sorting coords
| -rwxr-xr-x | layers.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -12,8 +12,14 @@ class layer: except: print "gps layer: failed to open", file try: - self.tl.parse(ll1) - self.br.parse(ll2) + l1=latlng() + l2=latlng() + l1.parse(ll1) + l2.parse(ll2) + tl.lat=max(l1.lat,l2.lat) + tl.lng=min(l1.lng,l2.lng) + br.lat=min(l1.lat,l2.lat) + br.lng=max(l1.lng,l2.lng) self.pixsize=latLng(abs(self.tl.lat-self.br.lat)/self.image.size[1],abs(self.tl.lng-self.br.lng)/self.image.size[0]) except: print "gps layer: failed to parse", file |
