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

learn more… | top users | synonyms

28
votes
5answers
2k views

Does ArcGIS for Desktop support SpatiaLite?

SpatiaLite is playing an increasing role in my organization. As it stood in 2012, using SpatiaLite alongside ArcGIS Desktop required an amount of importing and exporting of data that was not always ...
20
votes
5answers
1k views

What are advantages of using spatialite over shapefile?

I found spatialite more useful than shapefiles as it does not have the limitations of shapefile and it is also portable. Many people here use shapefiles to exchange data and even the experts do not ...
20
votes
2answers
5k views

Looking for fastest solution for Point in Polygon analysis of 200 million points

Apologies for asking a question that has been asked before -- I've read through answers, and I'm left wondering how to implement the recommendations. I've never used SQL, Python, C, and have only ...
13
votes
2answers
2k views

sqlite to spatialite

I have a sqlite database with a table that has a column for longitude and one for latitude. Is there a way to make this data base 'spatial'?
13
votes
6answers
1k views

Is SpatiaLite the only single file/db spatially enabled exchange format?

I am trying to figure out if there are other viable exchange formats for spatially enabled data. So far, it seems SpatiaLite is the only one out there, but it has yet to be adopted by the industry.
11
votes
6answers
4k views

How to run Spatialite on Android?

Does anyone know if it is possible to get Spatialite running on Android? Specifically for either Android 2.1 or 2.2. I've been browsing the web, and although it seems technically possible, I haven't ...
10
votes
4answers
3k views

How to export shape file to SpatiaLite

I have a shapefile with one layer. I can open it with QGis. Now I want to convert this shapefile or layer to Spatialite database. How can I do it? Is it possible to do with QGis?
10
votes
2answers
779 views

What is an “XYZM” measurement model?

SpatiaLite supports a remarkable number of different dimension models. Interestingly, some of their values support a "measure" coordinate (XYM, XYZM). How would this measure-coordinate be used, and ...
9
votes
3answers
253 views

A global, grid-like projection for creating heatmaps

I'm putting together an application where I need to create a vector grid which will be used to store and display a heatmap. It has the following requirements: Can cover the entire planet. The vast ...
9
votes
5answers
1k 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 ...
8
votes
3answers
2k views

Is Spatialite Really Slow?

I have a couple of thousand polygons in SpatiaLite. I am trying to do a "touches" query: select map1.* from map1,map2 where touches(map1."Geometry",map2."Geometry") and wow, is it SLOW! ...
8
votes
3answers
420 views

Remove duplicates from Spatialite

I have a Spatialite database with points. From time to time now points are added. What would be the easiest way to remove duplicates based on the coordinates? Hints are greatly appreciated.
8
votes
2answers
721 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 ...
8
votes
1answer
777 views

Is Read Only nature of SQLite support in ArcGIS for Desktop 10.2 documented?

I've recently started creating SQLite geodatabases using ArcGIS for Desktop 10.2 with both ST_GEOMETRY and SPATIALITE storage data types and was impressed by how easy this was to do. I then tried to ...
8
votes
1answer
250 views

How does Spatialite handle concurrent access?

I understand that Spatialite is meant to be used by a single user/machine at a time. However if the data is stored on server, there is no guarantee that someone on another machine will not also open ...
7
votes
3answers
3k views

How to create a new Spatialite database in QGIS

I've been trying to create a new spatialite database within QGIS 1.8 (SpatiaLite Version 3.0.1; QSpatialite 6.0.3) and keep getting this error: "The SQL query seems to be invalid. no such table: ...
7
votes
1answer
878 views

Find Nearest Line Segments to Point

Background From a known Point, I require to establish the nearest surrounding "visible perimeter" against a table of MultiLineStrings, as shown on the diagram. I've searched this site with a number ...
7
votes
2answers
501 views

How do I use the Natural Earth SQLite DB with QGIS?

I just downloaded the Natural Earth data in SQLite format from http://www.naturalearthdata.com/downloads/. I had assumed that this would be a SpatiaLite database, but it appears not to be! QGIS is ...
6
votes
2answers
341 views

Why is this spatialite polygon layer not displayed properly?

In QGIS, I have a spatialite multipolygon layer that have full objects in attribute table but do not display random ones as I scroll and pan around: Vietnam map at zoom level 1:16000000 - some ...
6
votes
3answers
3k views

How to find nearest neighbors between two tables with point locations in SpatiaLite?

I have started playing with SpatiaLite today and already stumbled upon a problem. For each point location stored in tableOne I would like to select one, nearest (linear distance) point from tableTwo. ...
6
votes
1answer
753 views

Is SpatiaLite or SQLite Spatial an Accepted Standard?

The reason why I ask this is because I have been undertaking some testing and have found that there seems to be many implementation and not all of them are interchangeable. For example: FME can read ...
6
votes
1answer
183 views

Finding all neighbors for all polygons in Spatialite

Excuse me if this is a basic question but I'm new to Spatialite... I have a dataset with zip code polygons and I would like to create a list where for each zip code we have listed all the neighboring ...
5
votes
2answers
117 views

Can someone give the absolute lowdown on the following list of spatial operators

Ok, I have to admit, I don't really delve too deep into the semantics of the spatial operators list below, I'm more of a user, I write software to drive the SQL most of the time and don't really think ...
5
votes
4answers
3k views

How to convert multipoint layer to point

I have a Spatialite layer which is multipoint (following a QGIS Save As from shapefile). I need it to be PostGIS and POINT. I have tried ogr2ogr -nlt POINT and got 'new row for relation "xxx" violates ...
5
votes
4answers
613 views

How to merge close points into polygon?

I have a set of coordinates (points & no overlaps) in a single table,each containing attribute number fields,like in the following image. I want to merge these points into smallest polygons by ...
5
votes
1answer
178 views

Where is the Spatial reference ID stored in SpatiaLite?

I have loaded a shapefile into a SpatiaLite Database using the spatialite-gui. In which table is the Spatial reference ID or EPSG code (of the stored data)stored in SpatiaLite?
5
votes
2answers
626 views

Access to SpatiaLite .dumpshp via Python?

I'm trying to interact with a SpatiaLite database via Python on my Windows machine. I've managed to connect to the database and load the SpatiaLite extension, which means that I can pass SQL queries ...
5
votes
1answer
850 views

SQL Query to Reverse Geocoding in PostGIS

I try to do Reverse Geocode from my shapefile on the database. I'd already try with Spatialite and PostGIS to put shapefile (.shp) into it. But I'm still can't delivered my objection about reverse ...
5
votes
1answer
627 views

What is the efficient way to dissolve polygons using Spatialite 3.0

I have polygon table called "tableA" with 72000 records. It has a geometry column called "geometry", and a text column called "field1". I want to aggregate\dissolve all polygons with the same ...
5
votes
3answers
646 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 ...
4
votes
3answers
489 views

Best choice for building static maps: PostGIS, SpatiaLite or Shapefile?

I usually build static topographic maps, which are mostly printed. I'm often using OSM and rasterfiles (mainly different DEMs). The areas I'm mapping seldom exceeds 20.000 km². I'm using exclusively ...
4
votes
3answers
1k 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 ...
4
votes
2answers
599 views

How to delete a broken index in SpatiaLite?

I managed to screw up an index in my SpatiaLite database. The index was created using spatialite-gui. In the meantime, I deleted the original table and three out of four index files: ...
4
votes
2answers
351 views

Is it possible to add a new line in a non-spatial table using Qgis?

While using QGIS, and having loaded a non spatial table (from a dbf or a Spatialite table), is it possible to add a new row to its table attributes? Normally in a spatial layer you have to use "add ...
4
votes
2answers
1k views

How do I split polygons into line segments?

How can I split my polygon file into "segements"? The lines should be broken up like this picture shows:
4
votes
1answer
399 views

Can Spatialite SQL statements be issued with a python script in QGIS?

In my previous scripting environments (ms-access and Manifold GIS), it was possible to create and execute SQL queries from withing VBA or VB Script procedures. This is really useful for things such ...
4
votes
2answers
375 views

How do I reduce the number of drawn polygons on an Android Map?

We're using spatialite-android and Nutiteq to render Archaeological datasets. One of our sample data sets has 7000 polygons that turn into 400,000 objects in our renderer. Is there a common GIS ...
4
votes
1answer
675 views

Spatialite SpatialSQL Query

I've been flummoxed by this query. I have a table of points, and a table of lines, and I am trying to return the point id and line id whenever the point is contained within a buffer of the line (i.e. ...
4
votes
1answer
164 views

Where are the Spatialite settings stored?

after moving a spatialite-database to another directory, qspatialite says "Can't connect to Database" / Error unable to open database file. Even no project is open or I try to create a new project. In ...
4
votes
1answer
513 views

Shorter Version of this SpatiaLite Query

I've been doing some spatial queries using spatialite, and they're large enough that a spatial index becomes a must. An example of using an index is given in the tutorial spatialite> SELECT ...
4
votes
1answer
73 views

SpatialLite BulkLoad and Merge

Via the U.S. Census I have downloaded all of the census group shapefiles. These are approximately 19-20GB across 56 shapefiles. I want to merge these to do some testing. Clearly, shape file ...
4
votes
2answers
182 views

can Well Known Text tables be used effectively, stored in Access or Base?

My question is: How do I import WKT text data back into QGIS, and how useful could Base or Access be in storing the data using WKT rather than spatially enabling it within a proper GIS database, like ...
4
votes
1answer
790 views

how to add a custom SRID to Spatialite

I'd like to create a spatialite database and load it with shapefiles using the Mississippi Transverse Mercator (MSTM) projection, but it doesn't have an EPSG definition in the spatialite library of ...
4
votes
2answers
329 views

Binding between QGIS custom form (Qt Designer) and date/time field in a SpatiaLite database table

For my attribute table I created a custom form in Qt Designer. The table has a date field and a time field. In Qt Designer there are widgets for entering date and time. But what data type is expected ...
4
votes
1answer
347 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 ...
4
votes
1answer
139 views

Is it possible to have a single foreign key column referenced to two or more different tables?

In Spatialite (3.0.1), having a normal (non-spatial) table, I would like to relate it to two different spatial tables, with different geometries types (multipolygons and polylines), using the same ...
4
votes
1answer
940 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 ...
4
votes
1answer
2k views

Help importing osm data into spatialite

I am trying to import OSM data into Spatialite. The data is a query from overpass called features.osm I'm using spatialite 3.0, and following examples, I have created a new database with: $ ...
4
votes
1answer
987 views

Split line using line/point in PostGIS 1.5

I have a layer that contains a master line (one big polyline) and a another layer that contains "break lines". I need to be able to split the master line at the intersection of each of these break ...
4
votes
1answer
443 views

How to load Spatialite extension via SQLite3 ODBC Driver?

I am having trouble getting the Spatialite extension to load as part of the SQLite3 ODBC driver...[aka the joys of making software somewhat spatial when it tries so hard not to be]. What works ...