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

learn more… | top users | synonyms

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 ...
4
votes
1answer
61 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
123 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 ...
4
votes
1answer
37 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
252 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
98 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
75 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
38 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
0answers
79 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 ...
1
vote
1answer
98 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
52 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
145 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
288 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
1k 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
133 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
2answers
263 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 ...
1
vote
1answer
114 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
161 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
31 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
35 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 ...
9
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
156 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
91 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
115 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
102 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
108 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
58 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
792 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
46 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
163 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
118 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
145 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
51 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
68 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
97 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
133 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
117 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
393 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
62 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 ...
4
votes
1answer
157 views

Is there a good way to use Spatialite in QGIS?

I am somewhat disheartened by my experience with Spatialite databases in QGIS. In theory, it could be what personal geodatabases are for ArcGIS: a consolidated, portable format that keeps projects ...
1
vote
2answers
161 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 ...
0
votes
0answers
45 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
107 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 ...
11
votes
5answers
3k views

How to build a geographic database of GPS logs?

On our aerial wildlife surveys we typically generate dozens of GPX files, and usually convert most of them into shapefiles for display in a GIS application. GPX files are a terrific way of keeping all ...
2
votes
0answers
85 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 ...
3
votes
3answers
2k views

Why are ogr2ogr SQLite geometry functions not available in command line?

I believe title is all clear.I'm using Ogr2ogr utilities & binaries to read geometry. I used something like this: ogr2ogr -f "SQLite" test2.sqlite test.sqlite -sql "SELECT ...
1
vote
1answer
39 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 ...
0
votes
1answer
106 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 ...