spatialite

How to use/install rtree in sqlite3 module in python 2.7 on windows

两盒软妹~` 提交于 2020-01-06 14:07:38
问题 I'm trying to use spatialite database with my django project that is using contrib.gis application (GeoDjango). When syncing database django gives an error "no such module: rtree". Apparently the sqlite3 module that ships with python 2.7.3 doesn't support rtree in sqlite database. How this can be fixed? 回答1: You need to build sqlite with the SQLITE_ENABLE_RTREE flag set. How you do that depends on your environment, but typically adding something like: -DSQLITE_ENABLE_RTREE=1 to your compiler

How to use/install rtree in sqlite3 module in python 2.7 on windows

时光总嘲笑我的痴心妄想 提交于 2020-01-06 14:07:28
问题 I'm trying to use spatialite database with my django project that is using contrib.gis application (GeoDjango). When syncing database django gives an error "no such module: rtree". Apparently the sqlite3 module that ships with python 2.7.3 doesn't support rtree in sqlite database. How this can be fixed? 回答1: You need to build sqlite with the SQLITE_ENABLE_RTREE flag set. How you do that depends on your environment, but typically adding something like: -DSQLITE_ENABLE_RTREE=1 to your compiler

Build a static library for iOS - specifically spatialite

拜拜、爱过 提交于 2020-01-03 17:03:05
问题 First, please forgive and point out if I am to use some other protocol for referencing another thread/post. There was a previous thread how to compile spatialite for iOS where the top answer partly described building spatialite as a static library for iOS. The answer included the text: "Once you've drag n drop the .a (both are required to work in the simulator AND on the real hardware), you can initialize spatialite by just invoking spatialite_init(1) ." I am guessing this is translated to

SQL/SpatiaLite: how to declare a column as geometry?

喜你入骨 提交于 2020-01-01 09:43:43
问题 I am creating a new table through a SQL query from a spatial table: CREATE TABLE SomeShapes AS SELECT ash.id, ash.Geometry FROM AllShapes ash WHERE ash.id = 30 However, this returns a "normal" table, so when I try to load it in a GIS program (QGIS), it doesn't show the geometry. How do I declare that the geometry column contains, well, geometry? 回答1: You need to create a "non-spatial" table, and then add the Geometry column to it. Then, you can insert data into your table. It can't be done in

Get Distance in Meters instead of degrees in Spatialite

喜你入骨 提交于 2019-12-31 10:02:14
问题 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. 回答1: Just multiply the value in degrees by 111195 - this value is (Earth mean radius)*PI/180 - that is 'mean length of one great circle

Get Distance in Meters instead of degrees in Spatialite

对着背影说爱祢 提交于 2019-12-31 10:01:21
问题 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. 回答1: Just multiply the value in degrees by 111195 - this value is (Earth mean radius)*PI/180 - that is 'mean length of one great circle

GeoDjango and Spatialite on Mac: issue with C extension Loading

大兔子大兔子 提交于 2019-12-22 09:42:36
问题 I'm following the GeoDjango Tutorial to set up a dev spatial DB for my project on my home machine, a Mac Mini running OSX 10.8.2. I installed the KyngChaos packages (UnixImageIO, PROJ, GEOS, SQLite3 and GDAL) and spatialite as detailed in the OSX section of the tutorial.. I created the database via spatialite, but when I try python manage.py sqlall world to check the model I get the following error: django.core.exceptions.ImproperlyConfigured: The pysqlite library does not support C extension

android spatialite调试

强颜欢笑 提交于 2019-12-19 18:46:47
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1、直接用gdal转坐标不行 2、建立空库,spatialite的空间元数据可以出现,也许可以直接sql 转坐标(没测试),但却不能用现有程序自动生成表结构。 3、也许可以重新写表结构的生成方法,即现有程序。 来源: oschina 链接: https://my.oschina.net/u/3756527/blog/3145064

Use spatialite extension for SQLite on Windows

人走茶凉 提交于 2019-12-17 20:13:57
问题 I know that this has been asked in some similar ways before. However, all questions I found on this dealt with some very specific system setups which were not applicable for me (because so is mine). System: Windows 7 64bit Python 3.4 64bit sqlite3 2.6.0 (shipped with Python I guess) Spatialite Windows binaries 2.3.1 (anything else of importance?) How can I activate the spatialite extension for the ´sqlite3´ module? What I tried (the way that other people in similar questions say it works):

how to compile spatialite for iOS

主宰稳场 提交于 2019-12-17 09:15:10
问题 I am new here and this is my first topic. I am very new on iOS platform and i am trying to use spatialiate extension with sqlite3 but i couldn't do this. It is making me crazy. I don't know how and where do i start. Can someone give me suggestion? Thanks. 回答1: I'm the guy who shared the libs on http:// ;-) I did some good progress on easing the integration of spatialite for iOS. Now I'm able to build a fully standalone static library of spatialite (2.3.1 that embeds the required GEOS and PROJ