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

learn more… | top users | synonyms

4
votes
1answer
499 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
26 views

Update Spatialite table with Python

I wish to update a column in a Spatialite table from a dictionary object using the pysqlite module in Python 2.7. I am accustomed to executing this operation on ordinary, i.e., non-spatial SQLite ...
0
votes
0answers
15 views

RecoverGeometryColumn( ) returns error: no such column

I tried running SELECT RecoverGeometryColumn( outtest, geometry, 3400 , POINT); in Spatialite 4.3 but get error: No such column outtest Outtest is a table - not a column as per the syntax: ...
0
votes
1answer
21 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 ...
2
votes
1answer
260 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
23 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
16 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 ...
1
vote
2answers
178 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
19 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
51 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
15 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 ...
2
votes
1answer
47 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
28 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
36 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
26 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
26 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
32 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 = ...
4
votes
1answer
275 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
1answer
196 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 ...
8
votes
3answers
978 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 ...
0
votes
0answers
42 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
65 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
31 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
81 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
75 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
26 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
64 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
60 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
61 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
26 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
33 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
68 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
24 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
104 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
58 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
24 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
35 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
91 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
29 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
33 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
123 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
54 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 ...
2
votes
0answers
70 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
229 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
33 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
69 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
46 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 ...