Add new gis.py module with spatialite helper methods

This commit is contained in:
Chris Amico 2022-01-13 22:52:08 -05:00
commit b579a9c8ae
7 changed files with 216 additions and 20 deletions

View file

@ -22,11 +22,6 @@ except ImportError:
OperationalError = sqlite3.OperationalError
SPATIALITE_PATHS = (
"/usr/lib/x86_64-linux-gnu/mod_spatialite.so",
"/usr/local/lib/mod_spatialite.dylib",
)
def suggest_column_types(records):
all_column_types = {}
@ -96,13 +91,6 @@ def decode_base64_values(doc):
return dict(doc, **{k: base64.b64decode(doc[k]["encoded"]) for k in to_fix})
def find_spatialite():
for path in SPATIALITE_PATHS:
if os.path.exists(path):
return path
return None
class UpdateWrapper:
def __init__(self, wrapped, update):
self._wrapped = wrapped