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

learn more… | top users | synonyms

0
votes
0answers
10 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
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 ...
2
votes
0answers
18 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
48 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
14 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
24 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
35 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
23 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
31 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
40 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
61 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
30 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
74 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
46 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
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
2answers
56 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
63 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
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 ...
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 ...
0
votes
1answer
32 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
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
67 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 ...
2
votes
0answers
23 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 ...
0
votes
2answers
57 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 ...
4
votes
1answer
80 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 ...
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
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 ...
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 ...
1
vote
1answer
88 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
1answer
53 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
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
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 ...
1
vote
1answer
59 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, ...
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 ...
4
votes
1answer
219 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 ...
0
votes
1answer
179 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 ...
1
vote
0answers
63 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
61 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 ...
0
votes
1answer
56 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 ...
2
votes
1answer
37 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 ...
2
votes
1answer
54 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 ...
1
vote
1answer
77 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
51 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
36 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 ...
2
votes
1answer
141 views

How to delete a column from the attribute table of a SpatiaLite layer?

I want to delete a column from Attribute table but the function "Delete columns" isn't highlighted. (When I am adding new layers I use New SpatiaLite layer, not Shapefile layer). So I have installed ...
0
votes
0answers
33 views

High-performance k-nearest neighbor MBRs from given point using spatialite?

I've built an 2-dimensional spatialite db with millions of polygons inside. What I want to do is to find the polygon which is the nearest from given (x,y) coordinate. This is what I want to do. ...