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

learn more… | top users | synonyms

0
votes
0answers
17 views

What are the significant differences between SpatiaLite and Geopackage? [on hold]

SpatiaLite and GeoPackage are both based on SQLite. Both are supported by ArcGIS and GDAL (and therefore all projects that rely on GDAL, such as QGIS and R). I would like to adopt one as the default ...
0
votes
2answers
223 views

Performing spatial join in Spatialite (QspatiaLite for QGIS)

I'm trying to spatially join and summarize the attributes of a set of buildings to a set of containing parcels. There are (potentially) many buildings to each one parcel. Here is the query as I'm ...
2
votes
2answers
21 views

Correct syntax for loading virtualxl spatialite table?

I believe I have successfully loaded a virtual Excel table into a spatialite database using the SQL below - typed into the qspatialite plugin for QGIS. create VIRTUAL TABLE MyVirtualTable1 USING ...
4
votes
1answer
535 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 ...
0
votes
1answer
16 views

Installing spatialite-gui using ubuntugis

I am unable to install spatialite-gui using the ubuntugis unstable ppa. There appears to be a conflict between the GEOs libraries required by QGIS, which I installed first successfully (GEOS 3.5.0 ...
0
votes
0answers
12 views

Error while publishing layer from spatialite store in GeoServer [duplicate]

I've installed Spatialite extension on GeoServer(2.5) successfully. I created a new Spatialite database (*.sqlite file) and loaded some sample shapefiles into it. Then I added a new Spatialite data ...
1
vote
1answer
702 views

Create Buffer in meters Spatialite query

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) Here, A.Geometry = LINESTRING(23.2161 69.95237, 23....
3
votes
1answer
74 views

QGIS managing relationships

Coming from an ESRI background I'm used to ESRI geodatabases (.mdb or .gdb). In those databases, I could create feature classes, tables and relationships between them. Every time I loaded a feature ...
2
votes
1answer
491 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 ...
0
votes
1answer
183 views

Getting wrong value for area of geometry using Spatialite?

I am trying to implement a measuring tool on apple maps for IPAD. As a part of that i collect all the touch points on the map into an array and constructing a geometry object from that and then ...
4
votes
2answers
926 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
207 views

About spatialite views and Attribute table

I try to use views with spatial column in spatialite. I can connect to spatialite database and load the layer without problems but when I try to view data in Attribute Table I can't get eny data; all ...
1
vote
0answers
30 views

How to create dissolved buffers using QGIS virtual layers?

To create dissolved buffers in PostGIS I use ST_Dump and ST_Union: SELECT row_number() over() AS gid, sbqry.* FROM ( SELECT (ST_Dump(ST_Union(ST_Buffer(input_layer.geom, 100))))....
2
votes
1answer
38 views

Add layers to Spatialite Database using PyQGIS

I would like to add layers into a spatialite database. I have used the QgsVectorFileWriter method: parcDisSHP='/xxx/xxx/xxx/xxx/FILE.shp' parcelasDis = QgsVectorLayer(parcDisSHP, 'Parcelas_Unicas', "...
0
votes
0answers
20 views

Loading SpatiaLite tables with WHERE clause with pyqgis?

I have some layer in a SpatiaLite database that I want to filter and load in QGIS through pyqgis. From the pyqgis cookbook I read that it is possible to add a WHERE clause, so my script is like: db =...
0
votes
1answer
20 views

Update query with sub query and join in Spatialite

I am looking to do an update query to one table (munparcel_zoning) with the sum of values from a column in another table (permability.permarea) where the type (permtype) is equal to a value (...
1
vote
1answer
278 views

ogr2ogr from personal geodatabase to spatialite produces “non-spatial” tables

I have around 4 GB of data in 10 separate Personal Geodatabases, each of which contains multiple feature classes. I'm trying to convert the smallest one to SpatiaLite via ogr2ogr, in preparation for ...
1
vote
3answers
380 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 planet_137.084,-15....
8
votes
3answers
572 views

Remove duplicates from Spatialite

I have a Spatialite database with points. From time to time now points are added. What would be the easiest way to remove duplicates based on the coordinates?
0
votes
1answer
122 views

Visualizing map from Spatialite DB on Mobile

I am working on an Android application for a school project. I am converting shapefiles (examples) into SQLite databases using SpatiaLite and performing queries on those databases on the mobile with ...
1
vote
1answer
973 views

Error Loading spatialite extension in .NET Project using System.Data.SQLite

I am trying to use Spatialite in a .NET application using the System.Data.SQLite provider. I have tried to load 'libspatialite-4.dll' but an error happens when I call function "conn.EnableExtensions(...
0
votes
2answers
52 views

Converting SpatialLite.Core.API.IGeometry to GeoAPI.Geometries.IGeometry

I have an in-house .NET library which processes geometry data in GeoAPI form (https://github.com/NetTopologySuite/GeoAPI). Within this library I have a method which I need to call which is expecting a ...
2
votes
0answers
60 views

How to speed up work with local maps in QGIS?

within one project we are distributing a QGIS project including offline maps (you can get it here - has about 1GB) to display measurement data. Looks this way: I need to keep it as easy as possible ...
2
votes
1answer
60 views

ST_LocateAlong interpolation: difference between PostGIS and Spatialite

In a previous question, I discovered that ST_LocateAlong along a LineStringM is not implemented the same way in Spatialite than in PostGIS. While PostGIS interpolates between measures, this is not ...
0
votes
0answers
139 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 ...
0
votes
0answers
56 views

QGIS Spatialite multi-part editing

I'm exploring Spatialite, about which I know very little but trying to change that. I have started recording a walking route. On Days 1 & 2 I did the same route so copied the polyline feature ...
0
votes
0answers
35 views

What is the ogr2ogr syntax for exporting from Oracle to Spatialite?

I want to export data from Oracle to spatialite, 3 tables with geometry and 1 attribute table. Alternatively, I already have this data written out nightly using ogr2ogr, but the output location is a ...
1
vote
2answers
49 views

Find centroids of rows with Multipoint Geometry

I wish to find the centroid of a set of given points. The points will be rows of my SpatiaLite database and have Multipoint geometry. I checked the SpatiaLite manual but the ST_Centroid function I ...
2
votes
3answers
135 views

In QGIS how do I edit/save data which has no geometries?

In QGIS I can import data tables (CSV in particular) which have no inherent geometry (and no lat/lon columns) into QGIS. There doesn't seem to be any obvious way to manipulate that data (edit/save). ...
1
vote
1answer
22 views

InitSpatialMetaData errors with Spatialite

This Stackexchange may not be the best place for this question but I will start here. I am trying to create a spatially-enabled, sqlite3 database. The following code is a short example of what I am ...
2
votes
4answers
115 views

merge overlapping polygons with spatialite

The green points, buffered by one of the point attributes, should result in the three areas outlined in red (a table with three rows): I'd like to do it in spatialite. How can I do that? If it's ...
2
votes
0answers
44 views

How to use ST_VoronojDiagram for points that are almost aligned?

I am trying to use the spatialite ST_VoronojDiagram function on a table containing four 4 points that are almost aligned: (1.01 2.02, 2.02 3.03, 10.01 10.02, 11.01 11.02). I wrote the following script ...
0
votes
1answer
29 views

Spatialite union more than two layers / tables

Is there a way to union or collect any number of layer geometries with Spatialite (or another spatial database)? Two is simple enough, but more than that becomes convoluted. For example, if all I want ...
1
vote
1answer
33 views

Create lines between two points, given an ID

I have a spatialite point table (p1) with an additonal column (pid) that relates each point to a point in another point table (p0) in the same database. I want to create a line between every pair of ...
1
vote
0answers
35 views

Finding point on line closest to other point: unexpected results [closed]

I'm basically trying to do the same thing as outlined here: Finding the point closest to a point on a near feature However, the results I'm getting with the queries suggested in the accepted answer ...
1
vote
1answer
69 views

Qgis 2.14 & spatiaLite : MakeLine and aggregate function

I want to create a line between points 104 and 74. This works : select 1 as axe, make_line(p1.geometry, p2.geometry) as geometry from MR200_amers_plan p1, MR200_amers_plan p2 where p1.matricule = ...
0
votes
0answers
62 views

How to publish layer from spatialite store in GeoServer

I've installed Spatialite extension on GeoServer(2.8.3) successfully. I created a new Spatialite database (*.sqlite file) and loaded some sample shapefiles into it. Then I added a new Spatialite data ...
4
votes
1answer
59 views

Connecting to a spatialite DB, querying, writing the queried result to a spatialite table using PyQGIS

I am developing a plugin that connects to a spatialite DB , do some queries and outputs the results to a spatialite table. I had tried with the below code to connect to the DB and print the queried ...
0
votes
1answer
236 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) ...
1
vote
1answer
62 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 ...
2
votes
1answer
31 views

QGIS 'Save As' to Spatialite is changing integers into strings

Using QGIS 2.14.0, Windows 10, when I use 'Save As' to save a polygon shapefile as a Spatialite layer (all options left as default), all of the input integer fields are incorrectly output as text ...
0
votes
0answers
22 views

Using SpatiaLite with Clion

What is the easiest way of importing the SpatiaLite (C++) with the Clion IDE ? I have been trying all sorts of different ways, but nothing seems to work. Does anyone know how ?
1
vote
1answer
63 views

How to get the long/lat information from a NodeID and vice versa

In the SpatiaLite website they explain how to use .osm data to create a SpatiaLite database, that contains a single table, where each row is an arc of the road graph. Then, they explain the procedure ...
1
vote
1answer
47 views

QGIS crashes (dumped crash) while importing SHP layers or SpatialLite

I meet problems with the last version of QGIS (Lyon 2.12.3) 64bits on Windows 7. The software crashes as soon as I load a SHP layer or use SpatiaLite layers (created from OSM data). Besides, each ...
-1
votes
1answer
69 views

The reason why dataset does not create layer

I have a plugin written in Python, and two versions of the QGIS, assembly there are differences, but the main suspect, that the version of GDAL==2.0.0dev (1) another 1.11.3 (2) for first >>>...
0
votes
1answer
44 views

Count polygons that intersects polygon in Spatialite

I am trying to do a very simple query, but keep getting an error. I am looking to get the count of polygons that intersect with another polygon. I've used the following query: SELECT feature__1 AS ...
0
votes
0answers
59 views

How to use SpatiaLite functions in a Python script?

I'm trying to find the intersection coordinates between a line (knowing its start and end points) and a polygon (SQlite file). I've managed to make it work in QGIS by creating a shapefile for the ...
0
votes
1answer
31 views

ST_Union returning Null with Spatialite, even after ST_MakeValid

I am attempting to run ST_Union on some features in a GROUP BY Spatialite query, with the aim of counting the number of features, and the total area of those features, which may overlap so should not ...
1
vote
1answer
214 views

How to create a new database in spatialite and insert the data using python in Qgis

I want to create a new database in spatialite and want to connect to the database and execute the sql queries. conn = db.connect('myDB.sqlite') # creating a Cursor cur = conn.cursor() sql = 'select * ...
8
votes
4answers
1k views

Can QGIS Read Spatialite Views?

I have a spatialite database I created that spans several years of crime data. To facilitate a real-world scenario where I may simplify the interaction for a user by introducing a View that simply ...