Need to get the code to work with spatialite databases. it is currently trying to connect with sqlite but that has none of the geospatial functions.