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

learn more… | top users | synonyms

1
vote
1answer
68 views

How to manage QGIS styles saved in Spatialite

At QGIS 2.14 the style files we have saved in our Spatialite database do not show the labels anymore. Luckily I have the Layer Definition Files saved that still display the labels, but in trying to ...
5
votes
2answers
751 views

Defining spatial operators (Equals, Disjoint, Touches, Within, Overlaps, Crosses, Intersects, Contains, Relate)?

Ok, I have to admit, I don't really delve too deep into the semantics of the spatial operators list below, I'm more of a user, I write software to drive the SQL most of the time and don't really think ...
0
votes
1answer
84 views

convert GPS coordinates to SRID coordinates in spatialite

The following query fails for me: select account_nu, srid(geometry), AsText(Geometry) from tbl where contains(geometry,MakePoint('35.16604','-101.8635',4326)); I would like to find shapes that ...
1
vote
0answers
31 views

AutoNumber in Spatiallite

I have a spatiallite database. In this database I have some attributes. One of them is the attribute Nr_. In this attribute the value must be assigned automatically and is not allowed to be a double. ...
4
votes
0answers
219 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) ...
1
vote
1answer
64 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 ...
3
votes
1answer
66 views

QGIS convert long integers stored as string to integer [duplicate]

I have long integers (11 characters) stored as text in a shapefile that I need to convert to integers, but when I attempt to convert them in the QGIS field calculator, I get the following error: Eval ...
7
votes
1answer
182 views

Join by attribute / spatialite with SQL / left outer join in QGIS

I have a layer with polygons (let's call it "woods") that is intersected by "n" line-objects ("roads"). Every road has an unique attribute roadid. I need to add ALL the roadid's (not only the first ...
0
votes
0answers
30 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 (http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2....
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
385 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
71 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 ...
2
votes
1answer
320 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
277 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
92 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
76 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
173 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 https://faimsproject.atlassian.net/wiki/display/FAIMS/...
4
votes
1answer
41 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
358 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() uri....
1
vote
1answer
100 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
88 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
43 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 ...
1
vote
0answers
110 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 ...
2
votes
1answer
113 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
67 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
210 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
311 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
2k 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
139 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
1answer
195 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 ...
3
votes
0answers
176 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
32 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
44 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 ...
10
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
192 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
102 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
18 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
135 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
115 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
141 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 ...
1
vote
1answer
69 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 ...
6
votes
2answers
966 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
55 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
235 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 ...
2
votes
1answer
130 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
190 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
52 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 ...
0
votes
0answers
86 views

QGIS Spatialite tabular updates are very slow

I am exploring Spatialite in QGIS (2.10.1), and it is very slow to save tabular edits (with 1200 records, several minutes once I click the pencil button, versus less than 1 second with the data as a ...
2
votes
1answer
156 views

ST_MakeValid is not working?

I have a polyline spatialite database, tried to perform repair geometry in QGIS using python with the following code: from pyspatialite import dbapi2 as db conn = db.connect(r'D:\db.sqlite') cur = ...