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

learn more… | top users | synonyms

8
votes
3answers
942 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 ...
2
votes
1answer
235 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
0answers
35 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
45 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
27 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
71 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
67 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
1answer
184 views

Can't build 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 ...
4
votes
1answer
457 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 ...
0
votes
0answers
23 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 ...
4
votes
1answer
256 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
0answers
23 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
1answer
44 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
2answers
47 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
2k 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 ...
1
vote
0answers
57 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
1k 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
24 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
26 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 ...
5
votes
4answers
2k views

How do I add (and map) a non-spatial table to QGIS from SQLite?

I have an sqlite file from my Wigle Android app (wiglewifi.sqlite). It's not a spatial file, just tables with lat/lon and other data. I can add spatialite layers just fine, but cannot seem to find a ...
1
vote
1answer
55 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 ...
0
votes
0answers
19 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
100 views

Problems with connecting QDateEdit and QTimeEdit widgets to corresponding Field in QGIS Layer (shp/spatialite)

Could anybody give me a hint how to connect the QDateEdit and the QTimeEdit widgets with a field in a QGIS layer (shp or spatialite). The fields in the QGIS layers are from datatype "date" ...
0
votes
2answers
46 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
0answers
22 views

Relative path in layer styles in spatialite

is there way to store default style in relative path in spatialite??it has layer styles table,and a column 'f_table_catalog'.and in this column pathes are absolute,In Qgis project options i set ...
2
votes
1answer
26 views

Converting sqlite (spatialite) data to oracle sdo_geometry (using .NET)

Using .NET, I have a sqlite file that I have to import to oracle. The geometry needs to be converted from sqlite (spatialite) geometry column to a sdo_geometry column in oracle: // Loop through all ...
1
vote
1answer
70 views

How to convert multiple vector layers to georeferenced rasters using QGIS?

I have Openstreetmap background loaded in QGIS - currently from Spatialite, but no problem to get shapefiles. I need to convert the loaded map to one big raster or could also by more smaller ones, ...
1
vote
0answers
27 views

How not to enforce lowercase field names in Spatialite?

I use a geojson file to publish a webmap. When I need to update the data I convert it to Spatialite, add the data, then convert back to geojson. Recently in QGIS 2.8 I found that the column names ...
0
votes
1answer
32 views

Spatialite table column is function in itself

GOAL: I'm trying to filter all the 1's in a spatial boolean operation in Qspatialite, the spatialite plugin for QGIS. ATTEMPTED SOLUTION: My solution is to perform the boolean query first, export the ...
1
vote
2answers
118 views

Adding Nodes to Linestrings at Overlapping Points with Polygon Layer in Spatialite

I have two Spatialite tables. A table called 'lines' which contains a PK column called OGC_FID and a LINESTRING column called GEOM. A table called polys which contains a PK column called OGC_FID and ...
1
vote
1answer
44 views

ogr2ogr does not set osm_id for all multipolygons

I used ogr2ogr to convert from osm data (pbf) to spatialite : ogr2ogr -progress -f SQLite -dsco spatialite=yes france.simple.spatialite france-latest.osm.pbf then, a large part of the imported data ...
1
vote
0answers
59 views

Enable LWGEOM for OGR tools (QGIS 2.8)

I am doing some scripted operations on a Spatialite DB using OGRINFO, OGR2OGR etc. in the QGIS 2.8 OSGEO4W shell. Unfortunately, LWGEOM functions such as ST_Split() are unavailable and ...
4
votes
1answer
173 views

Dump a GeoJSON FeatureCollection from Spatialite query with Python

Given a Spatialite database, holding a table with a geometry column and some other attribute columns. I want to query that table in a Python script and get a GeoJSON FeatureCollection string in return ...
1
vote
0answers
28 views

QGIS attribute form editor crashes on Spatialite source

I have collected an attribute table (no geometry) together with other stuff in a Spatialite DB for easy portability. The idea was to hand off just one file and DB for field work. The Problem: The ...
1
vote
2answers
64 views

Buffer View With SpatiaLite and QGIS

Creating a dynamic buffer with PostGIS the following view is working: CREATE VIEW buffer500m AS SELECT gid, st_buffer(geom,500)::geometry(polygon,31492) AS geom FROM point; Unfortunately this query ...
1
vote
1answer
44 views

assigning random points to unique values

I have generated random points in qgis and would like to assign the value of their geometry to a unique column in another table. I would like to do this in qgis or postgres or spatialite. Table A ...
1
vote
1answer
58 views

SQLite db with FDO geometries: how to assign ID of point in layer A to closest point in Layer B with SpatiaLite?

How can I assign ID of point in layer A to closest point in Layer B with SpatiaLite (find nearest neighbors for each point in A)? For each point stored in table fdo_fc1 I would like to select one, ...
2
votes
2answers
70 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). ...
0
votes
1answer
148 views

Insert Geopandas GeoDataFrame into Spatialite database

Is it possible to insert a Geopandas GeoDataFrame directly into a Spatialite database with Python so that the geometry column of the GeoDataFrame becomes a proper geometry table in the database which ...
2
votes
1answer
53 views

Is there Data Loader for QGIS or Spatialite?

Is there a tool that works like the data loader of ArcGIS for QGIS (or via Spatialite )? To integrate data in a database or a shapefile without having the same structure (and the tool allows to ...
0
votes
1answer
47 views

Map Positioning and Routing on Android

I have been instructed to create an small offline application in Android that have to: a) Use our own map in JPEG format as the basemap (Google Map / OpenStreet Map is not applicable) b) Show the ...
1
vote
0answers
60 views

Something changed in QgsVectorDataProvider().changeAttributeValues() in QGIS 2.8? [duplicate]

I have a plugin that works with QGIS 2.2 but does not work with 2.8. Only deleteFeatures() works fine, but changeAttributeValues(), changeGeometryValues() and addFeatures() not. I receive r == False ...
2
votes
2answers
54 views

Is a multi-database select possible with DB Manager?

I have data in two locations: geometry data (with attributes) on a PostGIS server (read only) a geometryless table on a local SpatiaLite DB (read+write) I need to select features based on data ...
0
votes
1answer
53 views

ogr2ogr Spatialite to csv very slow

I am using ogr2ogr to extract point data from a Spatialite db to a csv file:- ogr2ogr -f "CSV" commandtmp.csv dtm2.sqlite -lco GEOMETRY=AS_XYZ -progress -explodecollections the Spatialite db is 7GB ...
1
vote
2answers
598 views

How to speed up spatialite-query using spatialindex?

I have got 2 tables, one of type LineLayer called strlayer, the other one is a PolygonLayer called blayer. The LineLayer contains two rows called fromBland and toBland that should be filled with an ...
2
votes
1answer
36 views

Spatialite, NULL when using Distance

When using Spatialite, I cannot run a Distance query. I've tried investigating the data stored in the database, however it doesn't appear to be related to my database. If I run a Distance query on two ...
4
votes
2answers
499 views

How to add a geometry to an existing feature that was created with NULL geometry?

I have a simple SpatiaLite geodb loaded in QGIS with one table. There is a POINT geometry field and some alphanumeric data. In some cases I can record data about a specific site, but the coordinates ...
1
vote
1answer
73 views

Is there a way to save a spatial join as .sqlite?

I'm joining data from PostGIS and SpatiaLite databases in QGIS using the "Join attributes by location" (Vector -> Data management Tools) tool. However, this has a big limitation - I can only save the ...
0
votes
0answers
46 views

Showing large number of polygons in SpatiaLite on Android map?

I have 2,300 complex multipolygon features in an offline SpatiaLite database. How can I show them on an Android map without slowing the map to a halt?
0
votes
0answers
35 views

How to overwrite/change attribute values with QspatiaLite in qgis 2.6

I tried to work on the "tbl_datum_transform" table which is included srs.db data file. Just to let you know... i try to fill in the ntv2 - BETA2007 grid. How can i fill in something in the ...