spatialite

Spatialite iOS5 and xcode 4.5 - could not prepare statement: no such function: GLength

心已入冬 提交于 2019-12-11 12:46:30
问题 I am at the end of my sanity trying to get spatialite to compile with xcode 4.5 for iOS6 (or any other version). Actually, I can get it to compile using a technique based on Build a static library for iOS - specifically spatialite where the console returns that all is oK but when I run a query such as "select pk_uid from uk_highways order by GLength(geometry) limit 2" the statement won't prepare. Running the query "select pk_uid from uk_highways limit 2" will return 2 id's i.e. taking out the

Python: The pysqlite library does not support C extension loading

非 Y 不嫁゛ 提交于 2019-12-10 17:27:02
问题 I'm trying to get Spatialite to work with my django app, however, I've hit the following wall: raise ImproperlyConfigured('The pysqlite library does not support C extension loading. ' django.core.exceptions.ImproperlyConfigured: The pysqlite library does not support C extension loading. Both SQLite and pysqlite must be configured to allow the loading of extensions to use SpatiaLite. make: *** [syncdb] Error 1 Using ubuntu 12.04, I have installed pysqlite using pip within the same user and

Sqlite load_extension fail for spatialite in Python

£可爱£侵袭症+ 提交于 2019-12-09 03:04:00
问题 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

Could not load Spatialite extension in qSqlite ( QT 5.9)

倾然丶 夕夏残阳落幕 提交于 2019-12-05 06:01:59
问题 I am trying to load Spatialite as extension in qSqlite ( Qt 5.9), I have done that before with Qt4.8, but I failed with the QT5.9. I changed the sqlite.pri by removing "SQLITE_OMIT_LOAD_EXTENSION", and I did some change on the sqlite.c by removing the " #define SQLITE_OMIT_LOAD_EXTENSION 1 ", and adding " #define SQLITE_ENABLE_LOAD_EXTENSION 1 ". I also add the following lines to openDatabase(....) #if defined(SQLITE_ENABLE_LOAD_EXTENSION) | SQLITE_LoadExtension|SQLITE_LoadExtFunc #endif Now

Spatialite and iOS

故事扮演 提交于 2019-12-05 02:06:21
问题 I am trying to build the latest version of Spatialite for use on the iOS platform and am not making much progress. I have downloaded the latest version of the following libraries, and have attempted to bring them into one project (each as their own target) and build them as one static library. Spatialite (3.0.1 amalgamation) GEOS (nightly build on 20121114) PROJ.4 (4.8.0) Each download contains dozens of files intermingled with scrips, headers and source code. It is unclear from the steps

GIS buffer value degree to meters with spatiallite

我是研究僧i 提交于 2019-12-04 02:15:45
问题 I am new to Spatialite. I have following query: select A.* from linka as A, pointa as B where Contains(Buffer(B.Geometry, 100), A.Geometry) I actually want to create 100 meters buffer and get to know which are the link's are contained by it. I can able to find the inserted '100' is actually degree value and it's giving me output which are coming in this range. I can put the degree value also in my query but the transformation from degree to meters/kilometers is not same all around the world.

Could not load Spatialite extension in qSqlite ( QT 5.9)

爷,独闯天下 提交于 2019-12-03 21:10:54
I am trying to load Spatialite as extension in qSqlite ( Qt 5.9), I have done that before with Qt4.8, but I failed with the QT5.9. I changed the sqlite.pri by removing "SQLITE_OMIT_LOAD_EXTENSION", and I did some change on the sqlite.c by removing the " #define SQLITE_OMIT_LOAD_EXTENSION 1 ", and adding " #define SQLITE_ENABLE_LOAD_EXTENSION 1 ". I also add the following lines to openDatabase(....) #if defined(SQLITE_ENABLE_LOAD_EXTENSION) | SQLITE_LoadExtension|SQLITE_LoadExtFunc #endif Now the "requet.setQuery("SELECT load_extension('spatialite')", dbProject);" function is recognized, but I

SQLite + SpatiaLite problems

放肆的年华 提交于 2019-12-03 13:56:51
问题 I'm trying to access a SpatiaLite from C# using System.Data.SQLite provider. When I try to load the SpatiaLite extension, I always get the System.Data.SQLite.SQLiteException: SQLite error The specified module could not be found. error, even though the spatialite's dll has been copied to the bin directory. I even tried specifying the absolute path to the dll, but to no avail. Here's the code: string connectionString = @"Data Source=D:\MyStuff\projects\OsmUtils\trunk\Data\Samples\DB\osm.sqlite"

SQLite + SpatiaLite problems

扶醉桌前 提交于 2019-12-03 03:57:35
I'm trying to access a SpatiaLite from C# using System.Data.SQLite provider. When I try to load the SpatiaLite extension, I always get the System.Data.SQLite.SQLiteException: SQLite error The specified module could not be found. error, even though the spatialite's dll has been copied to the bin directory. I even tried specifying the absolute path to the dll, but to no avail. Here's the code: string connectionString = @"Data Source=D:\MyStuff\projects\OsmUtils\trunk\Data\Samples\DB\osm.sqlite"; using (SQLiteConnection connection = new SQLiteConnection (connectionString)) { connection.Open();

Get Distance in Meters instead of degrees in Spatialite

那年仲夏 提交于 2019-12-02 20:50:17
I have the following query: select distance(GeomFromText('POINT(8 49)',4326),GeomFromText('LINESTRING(8.329969 49.919323,8.330181 49.919468)',4326)) this gives me 0.97 degrees. But I need it in meters and do not know which SRID to transform to. Can somebody give me an example how to get the result in meters for spatialite? The positions are all in Europe. Just multiply the value in degrees by 111195 - this value is (Earth mean radius)*PI/180 - that is 'mean length of one great circle degree in meters on Earth's surface'. The result obtained using this method is within 1% of the geodesic