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

learn more… | top users | synonyms

0
votes
1answer
9 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
0answers
27 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))))....
0
votes
1answer
18 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 (...
2
votes
1answer
36 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', "...
2
votes
1answer
56 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
52 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
34 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
46 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 ...
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 ...
3
votes
1answer
72 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
4answers
114 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
28 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
66 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
56 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
57 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 ...
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 ...
2
votes
0answers
59 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
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 ?
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 ...
1
vote
1answer
61 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
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
41 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
56 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
183 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
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 =...
1
vote
1answer
64 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 ...
0
votes
1answer
81 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. ...
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 ...
3
votes
1answer
64 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 ...
1
vote
1answer
59 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
29 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....
7
votes
1answer
178 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 ...
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 ...
4
votes
1answer
75 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 ...
1
vote
0answers
91 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
40 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
168 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/...
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 ...
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 ...
1
vote
0answers
106 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 ...
2
votes
1answer
112 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
66 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
204 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 ...
1
vote
3answers
374 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....