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

learn more… | top users | synonyms

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 ...
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
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 ...
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
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
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 ...
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
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
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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) ...
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. ...
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, ...
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, ...
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 ...
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 ...
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 ...
0
votes
0answers
42 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 ...
0
votes
0answers
73 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
85 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 = ...
0
votes
0answers
93 views

how to use spatial index in spatialite query

I posted this question originally nearest neighbor query in SpatiaLite. Thanks to the answer given I was able to get the query working on some test data. However I am having trouble applying a spatial ...
1
vote
1answer
292 views

nearest neighbor query in SpatiaLite

I am trying to find the nearest line to each point in a layer, and I have over 1 million points. I want to be able to associated the closest unique line ID with the point unique IDs. I have tried to ...
0
votes
1answer
45 views

Create primary and foreign key on Spatialite

I try to create a database on spatialite (for various reason, I can't use PostGis). I need to link a table to another one using a foreign key. The problem with spatialite is that it is not possible to ...
1
vote
2answers
126 views

Is there any tool to execute Postgis-like queries without a postgres server?

I would like to know if there is any way/tool of using geoprocesing queries like the ones you use with POSTGIS but without the need of having an actual database server available. The particular ...
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
40 views

QGIS DB-Manager: How do I hide a geometry column?

I created a table on a SpatiaLite DB using the DB-Manager: CREATE TABLE Lines ( line_id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(256) NOT NULL); Then I "made it spatial": SELECT ...
1
vote
2answers
82 views

OpenStreetMap boundary relation lost when exporting to spatialite with ogr2ogr?

I am currently working in map for a province of Papua New Guinea. In OpenStreetMap (OSM) I have recently updated and added new relations for boundaries of admin_level=5 and admin_level=6, which were ...
1
vote
1answer
147 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
1answer
35 views

Create statistics by features in QGIS [duplicate]

I've a polygon layer for parcels in a landscape protection area and a point layer, contains zoological data (e.g species, entities, etc.). How can I make a statics for each polygon, contains the list ...
2
votes
0answers
77 views

Export shapefile from spatialite

I am using a spatialite db to perform a union and dissolve over a vector file. The vector inside the db looks like this: when I export the table with: ogr2ogr -f "ESRI Shapefile" -overwrite ...
0
votes
1answer
72 views

Error doing st_union in spatialite

I have a multipolygon layer in which I want to dissolved based on a class column. The steps I'm doing are: create table tc_2010_00567 (gid int primary key, tc_2010 text(32)); select ...
0
votes
0answers
26 views

Finding distance to travel along a linestring from current point

I am using Spatialite. I represent roads using LineString. When the user is on the road, I am interested in calculating the distance to travel to one of the ends of the road. I find this a fairly ...
1
vote
1answer
129 views

How can I dissolve adjacent polygons based on minimum attribute value? [duplicate]

I'm trying to merge the polygons (administrative boundaries) in a dataset untill they reach a minimum value. Lets say that the polygon dataset consists of the number of people per polygon and I need ...