spatialite

GeoDjango & SpatiaLite - filtering nearby objects

谁都会走 提交于 2019-12-01 23:35:00
问题 My models.py has User and Business models that have this field: location = PointField(geography=True) I'm getting Google Maps coordinates (in EPSG 4326 ) via Geocode service from an address which the user specifies. Then I'm saving it in the above field (also EPSG 4326 ). Now, what I want is to get all Business objects within a specified radius (of 1km for example), based on the user location: Business.gis.filter(location__distance_lt=(request.user.location, D(km=1))) But it doesn't work, it

GeoDjango & SpatiaLite - filtering nearby objects

旧巷老猫 提交于 2019-12-01 21:37:58
My models.py has User and Business models that have this field: location = PointField(geography=True) I'm getting Google Maps coordinates (in EPSG 4326 ) via Geocode service from an address which the user specifies. Then I'm saving it in the above field (also EPSG 4326 ). Now, what I want is to get all Business objects within a specified radius (of 1km for example), based on the user location: Business.gis.filter(location__distance_lt=(request.user.location, D(km=1))) But it doesn't work, it gives me this error: ValueError: SpatiaLite does not support distance queries on geometry fields with a

java.lang.UnsatisfiedLinkError in jsqlite.Database.internal_init in Android Spatialite

牧云@^-^@ 提交于 2019-12-01 20:52:18
问题 I'm new to developing for Android and using Spatialite and can't figure out why my app is crashing on a few devices because of this error: java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__) at jsqlite.Database.internal_init(Native Method) at jsqlite.Database.(Database.java:25) This crash report is from a Nexus 5 (hammerhead) with Android 6.0 but it's been

java.lang.UnsatisfiedLinkError in jsqlite.Database.internal_init in Android Spatialite

允我心安 提交于 2019-12-01 18:47:13
I'm new to developing for Android and using Spatialite and can't figure out why my app is crashing on a few devices because of this error: java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__) at jsqlite.Database.internal_init(Native Method) at jsqlite.Database.(Database.java:25) This crash report is from a Nexus 5 (hammerhead) with Android 6.0 but it's been reported on Xoom with Android 4.1 and a few other unknown devices. I think it maybe be related to NDK

cannot create column with spatialite -> unexpected metadata layout

本秂侑毒 提交于 2019-12-01 15:33:06
I'm very new with spatialite. I'm running on Max OS Mountain lion and I have installed SQLite version 3.7.17 and libspatialite 4.1.1 (using homebrew) I can load without error the extension libspatialite in SQLite : SELECT load_extension('/usr/local/Cellar/libspatialite/4.1.1/lib/libspatialite.dylib'); I can create a simple table: sqlite> CREATE TABLE test_geom ( ...> id INTEGER NOT NULL ...> PRIMARY KEY AUTOINCREMENT, ...> name TEXT NOT NULL, ...> measured_value DOUBLE NOT NULL); but when I add a Geometry column with spatialite I get the following message: sqlite> SELECT AddGeometryColumn(

cannot create column with spatialite -> unexpected metadata layout

柔情痞子 提交于 2019-12-01 14:30:59
问题 I'm very new with spatialite. I'm running on Max OS Mountain lion and I have installed SQLite version 3.7.17 and libspatialite 4.1.1 (using homebrew) I can load without error the extension libspatialite in SQLite : SELECT load_extension('/usr/local/Cellar/libspatialite/4.1.1/lib/libspatialite.dylib'); I can create a simple table: sqlite> CREATE TABLE test_geom ( ...> id INTEGER NOT NULL ...> PRIMARY KEY AUTOINCREMENT, ...> name TEXT NOT NULL, ...> measured_value DOUBLE NOT NULL); but when I

Sqlite load_extension fail for spatialite in Python

 ̄綄美尐妖づ 提交于 2019-12-01 03:43:20
I am trying to use the Spatialite beta version 3.0 because I am using Windows 7 on a 64-bit machine. I consistently get the dreaded sqlite3.OperationalError: The specified module could not be found. error when I try to load libspatialite-4.dll . I have tried the following: put libspatialite-4.dll and all the other dlls in the same folder use the full path to the dlls add the dll location to the 'PATH' environment variable append the dll location to the sys.path attribute as part of the Python code copy all the dlls in the c:\windows\system32 folder (complete with restart of the machine) copy

Install Spatialite for python (GeoDjango) on OS X

旧时模样 提交于 2019-12-01 00:15:33
问题 I am tearing my hair out trying to install Spatialite for GeoDjango! I am already using Homebrew, it's generally easy and convenient so I initially tried to follow the Homebrew instructions for GeoDjango. But this stops short of installing any database, i.e. Spatialite. The next step is to try and install Spatialite itself, but there are no Homebrew-specific instructions provided by Django docs. I found this tutorial which looks perfect - a Homebrew and virtualenv-friendly install of

Getting a working SpatiaLite + SQLite system for x64 c#

China☆狼群 提交于 2019-11-30 12:47:19
I need to create and access a spatialite-extended SQLite database under x64 windows. I have downloaded the latest version 1.0.92.0 called sqlite-netFx45-static-binary-bundle-x64-2012-1.0.92.0.zip of System.Data.SQLite . It is referenced from my Visual Studio (2012) project, and seems to work just fine by itself. I also have the latest precompiled x64 spatiaLite version 4.1.1 called spatialite-4.1.1-DLL-win-amd64.zip All the dlls from spatialite are present in the executing directory. When I try to load the extension: using (var conn = new SQLiteConnection("Data Source=\"" + _sqLiteFullName + "

NoSQL and spatial data

心已入冬 提交于 2019-11-29 20:36:17
Has any of you had any experience with using NoSQL (non-relational) databases to store spatial data? Are there any potential benefits (speed, space, ...) of using such databases to hold data for, say, a desktop application (compared to using SpatiaLite or PostGIS)? I've seen posts about using MongoDB for spatial data , but I'm interested in some performance comparison. Peter Neubauer graphs databases like Neo4j are a very good fit, especially as you can add different indexing schemes dynamically as you go. Typical stuff you can do on your base data is of course 1D indexing (e.g. Timline or B