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

learn more… | top users | synonyms

0
votes
0answers
5 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
14 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 ...
2
votes
0answers
44 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 ...
0
votes
2answers
193 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 ...
1
vote
2answers
39 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
128 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
9 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
1answer
450 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
1answer
223 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 ...
2
votes
0answers
44 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 ...
4
votes
1answer
473 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
4answers
75 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
40 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 ...
4
votes
2answers
858 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 ...
1
vote
1answer
175 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 ...
0
votes
1answer
23 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
26 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
32 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
52 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
22 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
53 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
221 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
42 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
2answers
40 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
1answer
28 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
16 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
44 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
33 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
62 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
27 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
45 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
24 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
73 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 * ...
0
votes
0answers
13 views

loading SpatiaLite tables with WHERE clause with pyqgis

the question is very simple. 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 ...
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 ...
1
vote
1answer
56 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
680 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
49 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
30 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. ...
3
votes
0answers
155 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
57 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
51 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
151 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
20 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 ...
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
303 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
66 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
304 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
224 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
85 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 ...