SpatiaLite is a spatial extension to SQLite, providing vector geodatabase functionality.

learn more… | top users | synonyms

0
votes
1answer
189 views

BuildCircleMbr with 1km of accuracy - spatialite

I want to create a Circle MBR in spatialite of 1km for example from lat/lon in WGS84 I use BuildCircleMBR but i am not able to generate this well. My query SELECT BuildCircleMbr(40.0,-4.0,1, 1000) ...
2
votes
1answer
379 views

Added columns in SpatiaLite wont appear in QGIS (attribute table)

I have a SpatiaLite Database with OSM-Data from planet osm (imported with the OSM import tool from QGIS2.0) Everything is fine so far. I can create, export, delete tables and draw them in qgis... but ...
1
vote
0answers
19 views

Foreign Key error, creating new splite db?

Attempting to use a plugin in QGIS (midvatten) that utilizes splite. I am attempting to create a db in a different EPSG than the plug in defaults to, im getting "foreign key constraint failed" as my ...
0
votes
0answers
5 views

Null output from Transform function of Spatialite

I am using Spatialite, an extension of SQlite and I have some problems running the transform function. According to the Spatialite functions page ...
4
votes
1answer
385 views

How do I link OGR with spatialite?

Problem & Evidence: I'm trying to create a spatialite file with the code snippet below. However the outDataSource object gets assigned NoneType and all subsequent (unshown) code fails. I'm ...
2
votes
2answers
1k views

How to combine MapInfo tab files into one spatialite DB?

I have many folders, each with a collection of MapInfo tab files (each folder has the same table names). For each folder I want to merge the tab files into one spatialite DB. My current method is to ...
2
votes
1answer
158 views

Loading mod_spatialite using sqlite3 for Python in Windows

I have been successfully using the mod_spatialite extension for sqlite in Linux for a while now, but a client wants an application that relies on mod_spatialite to work in Windows. I have extracted ...
2
votes
1answer
56 views

Creating SpatiaLite View in QGIS?

Using these instructions (there are several other examples to find, all look the same and all of them seem to work) http://www.gaia-gis.it/gaia-sins/spatialite-cookbook/html/sp-view.html "Hand-writing ...
4
votes
2answers
739 views

Configuring spatialite database access for Python 2.6.6

I'm working on a GIS project, and I would like to implement and test some geo-spatial algorithms in Python. For this purpose, I will not only need sqlite, but also spatialite, in order to store and ...
2
votes
1answer
281 views

Why are layers imported into a DB with Spatialite-Gui locked from editing?

I have a Spatialite DB which I have imported some shp files too using Spatialite-Gui. I have full read-write access to these layers via the Spatialite-Gui, however when I open these layers from QGIS I ...
3
votes
1answer
185 views

How to build a query tool for spatialite data in QGIS?

I am trying to build some tool for a collegue of mine to query data from a spatialite database while clicking on vector features. My first guess is, that I could do this with an "action" I define for ...
1
vote
0answers
58 views

Arcpy doesn't recognize spatialite tables after editing with QGIS

I'm working on a project that would like to use spatialite as a go-between for field edits using QGIS/IntramapsRoam and then loading the data to a file geodatabase. The workflow is as follows ...
4
votes
1answer
43 views

Editing Spatialite layer in QGIS gives “Problem deleting features” error

I started off with an OSM file and used QGIS to convert into a Spatialite database. QGIS is able to load and display the tables just fine but when I try to delete a feature all I get is a "Problem ...
2
votes
1answer
45 views

Spatialite not loaded in PHP5 on Ubuntu

I'm trying to install Spatialite (4.3.0a) on Ubuntu (14.94.2 LTS) ..... I'd like to use it with PHP (5.5.9-1) .... Following this post ...
4
votes
1answer
31 views

Trouble saving graduated color style in Spatialite db in QGIS

When I attempt to save a style with graduated colors for a vector layer in a Spatialite db, I receive the following error: Error looking for style. The query was logged I had success saving ...
2
votes
1answer
119 views

Connecting QGIS, SpatiaLite and Python?

I am trying to connect with python code, QGIS and Spatialite, to do SQL query. I have read some tips and I tried with this code, but no add anything. Any Idea? uri=QgsDataSourceURI() ...
1
vote
1answer
82 views

Get DE-9IM matrix in spatialite?

Is there a way to get the DE-9IM matrix between two geometries in a Spatialite function, analogous to the st_relate() function in PostGIS? (I find it very helpful to spatially join using intersect() ...
0
votes
1answer
35 views

How configure Spatialite for PHP Version 5.6.14 (on Windows 7 and Apache 2.4)?

I'm on Windows 7, using PHP Version 5.6.14 on Apache 2.4 and I'm trying to access to a Spatialite database. All works fine when execute "no spatial" SQL query in my PHP procedure but when I try to ...
0
votes
1answer
28 views

Geometry column read as Numeric after operation in SpatiaLite (QGIS)

Pretty weird problem with SpatiaLite used within QGIS (2.13) with the DB Manager. I have 2 layers (result of the same algorithm) and I use this function to merge them in a new table: CREATE TABLE ...
0
votes
0answers
39 views

Using peewee ORM with spatialite databases?

I would like to use the peewee orm in front of some Spatialite databases. Getting peewee to connect to a Spatialite database was relatively simple, and basically boiled down to: class ...
4
votes
2answers
2k views

How to store raster data in spatialite?

I want to cache my raster data(large geotiff files) on local database. I thought to use spatialite. I found librasterlite which provide functionality to do that. Can anybody point to some tutorial on ...
1
vote
1answer
54 views

Raster data QGIS and SpatiaLite?

I am a german student and study Geoinformatik. I have the task to store Raster data in SQLite. So use the turotial from the gaia page to Create a database and store a image (TIFF) named NaturalEarth. ...
0
votes
1answer
36 views

Spatialite function to generate a blob from a geometry

Using QGIS Python API, I want to avoid updating geometry with an UPDATE sql command. Why? I'm using a QSqlRelationalTableModel (see model-view programming if curious) and there are built-in editing ...
2
votes
2answers
62 views

Merge single points to multi point geometry

Is it possible to transform a point shape file in single part geometryy to a shape file with multi point geometry based on a attribute. e.g. in the shape are 50.000 records in 700 categories, now i ...
0
votes
1answer
233 views

Building x64 SQLite with spatiaLite?

I need a spatial-enabled SQLite solution for a x64 Windows application I am developing. I have examined and downloaded and attempted to compile the SQLite amalgamation package; I've looked at the ...
6
votes
4answers
1k views

Sqlite, Python 2.7 and Spatialite

I am trying to spatially enable my sqlite database: import sqlite3 db = r'c:\temp\mydata.sqlite' conn = sqlite3.connect(db) conn.enable_load_extension(True) cur = conn.cursor() cur.execute(r"SELECT ...
1
vote
0answers
122 views

Spatialite android trigger problem

I am developing an android application that uses the database spatialite, I use this project to integrate the database on android https://code.google.com/p/spatialite-android/ It works normally, ...
1
vote
2answers
120 views

ogr2ogr without spatialite support - How to fix it?

I am trying to use ogr2ogr to convert OSM data from pbf to spatialite. I used to do so with the following command: ogr2ogr -f "SQLite" -dsco SPATIALITE=YES png-full-last.db ...
1
vote
1answer
53 views

How to convert a complex project of shape files to a spatialite database?

We have a QGIS project made of ~10 shape file layers. The layers are saved on a shared server, and the project is used on different computers. Recently polygons and polylines have been been ...
1
vote
0answers
39 views

Open Street Map export to QGIS Lines not Polylines

I recently updated to QGIS 2.10.1 and have found that I can no longer view .OSM files. Before I simply dropped and dragged downloaded .OSM files into QGIS and it automatically split into four ...
0
votes
0answers
54 views

High-performance k-nearest neighbor MBRs from given point using spatialite?

I've built an 2-dimensional spatialite db with millions of polygons inside. What I want to do is to find the polygon which is the nearest from given (x,y) coordinate. This is what I want to do. ...
3
votes
0answers
107 views

Has API been written for SpatiaLite for Cordova?

I am creating an app in which I will be creating an AutoCAD model for a 3 floor building at my college. I'll be importing this model as a spatial object into my javascript app - then wrap it with ...
1
vote
0answers
27 views

What is the quickest way to find in which plots a set of points lie?

I know this sounds easy and lazy to ask, but I'm new to (spatial)database, and I have the feeling my solution is sub-optimal. But for my situation it's important to have good performance. What do I ...
1
vote
0answers
29 views

QGIS spatialite db errors

I recently upgraded QGIS by building QGIS 2.11 from source against GDAL 2.0 on my Ubuntu 14.04 system. After a few teething troubles I got it to compile using QT creator. I now find that I can't open ...
3
votes
0answers
82 views

How can I properly rename a table in a SpatiaLite DB?

Spatial layers (tables) in SpatiaLite include various supporting objects and metadata, including triggers, indices, and entries in (at minimum) the geometry_columns table. I'm looking for (preferably) ...
9
votes
2answers
1k views

Documenting inability to Start Editing SQLite geodatabase layers in ArcMap?

I've recently started creating SQLite geodatabases using ArcGIS 10.2 for Desktop with both ST_GEOMETRY and SPATIALITE storage data types and was impressed by how easy this was to do. I then tried to ...
2
votes
1answer
83 views

Merge 2 SpatiaLite layers into one

I pretty new to database, so the question could sound simple. I have a SpatiaLite database with some multipolygon layers loaded. What I would like to do is to merge (not dissolve) 2 layers into 1. ...
2
votes
1answer
69 views

How to calculate focal range on XYZ DEM in QGIS or Spatialite

I have a XYZ DEM of a fairly mountainous terrain and would like to identify flat areas using QGIS. How can calculate focal range in QGIS? Or would there be a way to do this in Spatialite? Ideally, ...
1
vote
0answers
17 views

Spatialite Index not matching

I have a dataset containing GPS points I store in a table with a geometry column. I use the following code to populate my table. CREATE TABLE STOPS_GEO ( stop_id TEXT PRIMARY KEY, stop_desc TEXT, ...
0
votes
1answer
81 views

Qgis 2.10 unable to add a new feature in spatialite via sql function “GeomFromText”

Using Python code in my plugin the function in sql language "GeomFromText(POINT(X Y))" gives the following error: "OperationalError: no such function: GeomFromText" Plugin functions in previous ...
0
votes
1answer
80 views

How to export to KML from Spatialite command line

The Spatialite GUI can export a Geometry column to KML file. How would one go about doing that from the Spatialite command line? I am looking for an example code preferably - the .help doesn't mention ...
1
vote
1answer
62 views

What is the command to export table as CSV in spatialite

I need to do two steps on command line in Spatialite: 1. remove duplicate rows from a table and then 2. export table as CSV Both of these are available in the GUI, but how do I do that on the ...
0
votes
1answer
41 views

Why does Spatialite layer prompt for CRS if SRID was not explicitly defined in Layer Options?

In QGIS, if I Save As... a SpatiaLite file and don't enter an SRID in Layer Options, I will be prompted for a CRS upon opening the file. Yet GDAL documentation says that this option is only for ...
5
votes
2answers
478 views

How to save multiple layers from QGIS to a Spatialite db?

I thought I had asked this before but I can't find any trace of it. Each time I save a layer from QGIS as a spatialite it insists on creating a new db ( if you select a existing db you are asked ...
2
votes
0answers
34 views

how to register view geometry made by MakeLine function?

I am trying to to create a spatial view on my spatialite database. CREATE VIEW v2_pump_view AS SELECT pump.ROWID AS ROWID, pump.id AS pump_id, MakeLine( ...
0
votes
2answers
101 views

Help finding point in polygon via Spatialite with example karst zones data

I'm working on a school project involving Spatialite and point in polygon queries. I've successfully followed this example: http://blog.crazystyle.net/?p=255 I am now trying the same sequence of ...
0
votes
0answers
58 views

find pairs of near features with geopandas, fiona, gdal etc

I have a feature class of points, a few thousands I have now, but I expect to deal with hundreds of thousands of points. I would like find pair of points that is within a specific distance. The ...
2
votes
1answer
104 views

QGIS Spatialite Views problems

I am trying to wrap my head around spatialite views in QGIS. However there are severe limitations that make it very cumbersome: Spatialite views in QGIS do no update, if the corresponding tables in ...
0
votes
0answers
85 views

create spatialite table geometry from X, Y coordinates and project to new SRID

I have a table with X, Y (long, lat) coordinates I wish to add to an existing Spatialite database. I am led to believe I need to create a geometry column specifying SRID 4326 when using long, lat. I ...
1
vote
1answer
46 views

What data format to do temporary editing with QGIS before committing it to a RDBMS?

I am trying to create a temporary spatial data from a PostGIS database that a user can do the editing on. Currently, I have a service that returns GeoJSON from the PostGIS database. But I don't think ...