supply tidy -xml -iq fountains.xml as fountains.db
This commit is contained in:
parent
fd20e4cc82
commit
d5e101e8bc
14578
databases/fountains-formatted.kml
Normal file
14578
databases/fountains-formatted.kml
Normal file
File diff suppressed because it is too large
Load diff
BIN
databases/fountains.db
Normal file
BIN
databases/fountains.db
Normal file
Binary file not shown.
2
databases/populatedb.py
Normal file → Executable file
2
databases/populatedb.py
Normal file → Executable file
|
@ -31,5 +31,5 @@ def iterate_kml(filepath):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
db = sqlite_utils.Database("trees.db")
|
||||
db = sqlite_utils.Database("fountains.db")
|
||||
db["locations"].insert_all(iterate_kml(sys.argv[-1]))
|
Binary file not shown.
|
@ -19,7 +19,7 @@ class ForestMapView(MapView):
|
|||
app = App.get_running_app()
|
||||
print(self.get_bbox()) # debug gps position
|
||||
min_lat, min_lon, max_lat, max_lon = self.get_bbox()
|
||||
sql_statement = "SELECT * FROM trees WHERE x > %s AND x < %s and y> %s AND Y < %s" % (min_lon, max_lon, min_lat, max_lat)
|
||||
sql_statement = "SELECT * FROM locations WHERE x > %s AND x < %s and y> %s AND Y < %s" % (min_lon, max_lon, min_lat, max_lat)
|
||||
app.cursor.execute(sql_statement)
|
||||
trees = app.cursor.fetchall()
|
||||
print(trees)
|
||||
|
|
Loading…
Reference in a new issue