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

learn more… | top users | synonyms

4
votes
1answer
463 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 ...
3
votes
2answers
418 views

Is it possible to embed QGIS layer styles in a Spatialite database?

Spatialite is a great alternative to shapefiles - but how could I store the QGIS layer style together with the data so that it has a default style? For a shapefile I would just save a [name].qml with ...
3
votes
2answers
683 views

Can I import a .gml file into Spatialite in QGIS?

I have some Ordnance Survey Address Base data files which have a .gml extension. I have imported them to GGIS as vector layers along with some mapping data but would like to explore them with ...
3
votes
1answer
352 views

Why is Spatialite showing dates in MM-DD-YYYY format?

I have a table with a dates column that is formatted in MM-DD-YYYY format, as shown in SQL SELECT statements. I'm using Qspatilite (QGIS 1.8) and Spatialite GUI. When I ORDER BY the date column it ...
3
votes
2answers
3k views

How can I use R-Tree to find points within a distance in Spatialite?

Create a table with 3D points: create table points (coords pointz); select CreateSpatialIndex('points', 'coords'); Insert 13k rows: insert into points values (geometryfromtext('pointz(...)')) Do ...
3
votes
1answer
93 views

Moving SpatiaLite Table into PostgreSQL using ogr2ogr?

How can I move a Spatialite table from a Spatialite db to a PostgreSQL db using ogr2ogr?
3
votes
2answers
146 views

Incorrect display of national characters from Spatialite in QGIS, Windows

I used this tutorial by Underdark (thanks much :-) ) to convert my area of interest from OSM file (whole Czech Republic downloaded from Geofabrik.de server). Used OSGEO4W shell (saying "GDAL 1.11.0, ...
3
votes
1answer
66 views

Does QGIS automatically use spatialite spatial indexes?

When you write a query in spatialite you have to manually join your query to the spatial index for that index to be used to speed up the query. When QGIS displays data does it take advantage of any ...
3
votes
1answer
111 views

How to combine Spatialite Databases

I'm trying to combine a few Spatialite Databases into a single database, so that I can properly reference them, etc. I don't care about referencing them to one another (No foreign keys, etc), but I ...
3
votes
1answer
230 views

Why is my Polygon (WGS84) in SpatiaLite 4 not displayed by QGIS? [closed]

I made a polygon in a SpatiaLite 4 database as follows: INSERT INTO test_pg (id, name, geom) VALUES (3, 'test', ST_PolyFromText('POLYGON((8.556824 47.185269, 8.611009 47.185269, 8.611009 47.218568, ...
3
votes
2answers
465 views

What's a good way store borehole data in SQLite / SpatiaLite?

I have a bunch of bores / wells with downhole data. The 'header' info for each borehole can easily go into a single table, but I'm wondering how best to store the downhole log data. Typically they are ...
3
votes
1answer
140 views

Convert planar distance to ellipsoid (real) distance

I have the following linestring which approximately marks an airport runway: LINESTRING(-381578.819887 6574044.360475, -378513.534443 6574799.475787) # EPSG 3857 LINESTRING(-3.427781 50.732117, ...
3
votes
1answer
100 views

Rasterlite db with multi table

When working with Spatialite DBs, I can store multiple tables in single DB. But now I want to store multiple raster tables on a single Rasterlite DB. I tried QGIS for conversion but it converts only ...
3
votes
1answer
364 views

How to open a Spatialite non-spatial view in QGIS

I'm using Qgis 1.8.0, and spatialite 2.3 in a Windows Vista machine. I have a database in Spatialite, and I have created a view from one of its tables. When I open it in QGIS, using add Spatialite ...
3
votes
1answer
206 views

Create new polygon layer based on areas of varying numbers of stacked polygons

I have several species range maps (as polygons) that overlap/stack. From this, I am trying to identify areas of highest biodiversity. Ideally, I'd like to create a new polygon layer, where 1 part is ...
3
votes
1answer
59 views

QGIS Quantile method

I have a question about the quantile classification in QGIS (2.6 and master, windows or linux). I used the points in polygon fonction. I have 100 polygons. In the attributes of my 100 polygon I get ...
3
votes
1answer
69 views

Spatialite WITH clause issue

I've encountered an issue: when I try to execute in Spatialite_GUI query that contains WITH clause I get SQL error: near "with": syntax error. Also WITH unlike SELECT and other keywords is not ...
3
votes
2answers
84 views

Is it possible to decrease detail level (decrease file size) in Spatialite OSM export?

I currently use Spatialite exports from OSM data (together with Google maps like styles by Underdark) which are very useful for me as the files are easily portable with the project and I do not need ...
3
votes
2answers
169 views

Combining MS Office with GIS

I would like to incorporate MS Office into my GIS program. I have been using QGIS and was wondering if this would be possible? I am trying to create a one stop shop for my staff to be able to ...
3
votes
1answer
737 views

Multiple geometry columns for points, lines, and polygons in spatialite?

I'm rather new to the GIS world and even newer to Spatialite and trying to create a new DB for our application. I would like to create spatial index(es) on the geometry column(s), but our geometry ...
3
votes
1answer
76 views

How to create a printable data sheet when using edit widget “value realtion” in QGIS 2.0?

I created a spatiaLite Database with a point layer (every point is a tree). Additional I created several tables to fill the columns of the spatial layer with attributes using the editing widget “value ...
3
votes
1answer
257 views

pyspatialite: Connot insert geometry

I'd like to insert a row with a point geometry with pyspatialite. The sql looks like this: insert into eqdata(origin_time, url, mag, lat, lon, depth, m_a, region, mt, the_geom) ...
3
votes
1answer
640 views

osm2pgsql loses connection at end of import for large PBF, north-america-latest.osm.pbf

I just wanted to check and see if anybody else out there encountered this issue before I started diving into the code. I'm using osm2pgsql to import OSM data into my Postgres database. I encounter the ...
3
votes
1answer
428 views

Why does AddGeometryColumn error using the libspatialite-2 DLL with pysqlite2?

What I'm trying to achieve is to create a geometry column of a point based on the latitude and longitude of that particular row in the already created table. Given the following code: ...
3
votes
1answer
177 views

storing jpeg in spatialite database

How to store jpeg file in spatialite blob column so that spatialite gui and Qgis can recognise the format and show the image. I have created in memory jpeg from raster bands using jpeglib and stored ...
3
votes
0answers
70 views

Preserve datatypes when using SQLite and QGIS

Following Nathan's SpatiaLite/DBManager solution in this answer, I find that once the layer is loaded from DB Manager into QGIS (2.6.1), any calculated fields are appearing as text values instead of ...
3
votes
2answers
70 views

problem merging polygons based on a column value - using Spatialite

edit: as I am unfamiliar with any tools I decided to try my luck with PostGis. I imported my data. and executed the query : create merged as select delomrade_code, st_union(geometry) from grunnkrets ...
3
votes
0answers
169 views

Why does the QgsVectorFileWriter have probelms creating vector files? [closed]

I am using QGis 2.0.1 and have tried to create a new GIS feature file (SQLite, Spatialite, and Shapefile) of a subset of the data. I am then saving a copy of the style of this layer and applying it to ...
3
votes
0answers
141 views

Handling non-spatial data for QGIS projects with Camelot

Most of my projects include data which is non-spatial or which is point data and can be managed by a regular relational database. Previously I found Manifold and ms-access were a good combination ...
3
votes
0answers
100 views

Can layers from Spatialite db be used as input for a Sextante model?

I'm trying to build my first models in SEXTANTE and already fail at the start. It seems not to be possible to add a vector layer which derives from a database. Orginally, the layers are from a .mdb. I ...
3
votes
0answers
94 views

QGIS Workflow Problem [closed]

I have 3 SpatiaLite layers (one without geometry but with fields that need to be filtered, one with points and one with polygons, both without any non-geometry fields) that need to be combined to a ...
3
votes
0answers
91 views

I'm trying to import united_states.osm into Spatialite and spatialite_osm_net just quits with no error

When I try to run spatialite_osm_net using united_states.osm as input, the program simply stops after Windows presents a pop-up saying the program ended with an error. No other information is ...
2
votes
3answers
818 views

Accessing GEOS functions in Python

The issue: I am using Windows 7, 64-bit operating system with Python 3.2. I must continue to use Python 3.2 because of a dependency with another API. I need some functions in GEOS that are not ...
2
votes
2answers
300 views

How can I create a multipoint geometry in QGIS?

I've got a Spatialite layer in QGIS with geometry type MULTIPOINT. Now I'd like to add some data in this table in the 'usual' way, so by doing multiple clicks in the map (e.g. left-click, left-click, ...
2
votes
3answers
344 views

How to embed metadata into a spatialite layer in QGIS?

Example usage: I have a spatialite layer which contain my fiber optic cable routes. In that layer there is a column named 'Cable types' with coded integer data: 1 for aerial cable, 2 for underground ...
2
votes
1answer
97 views

How can I get the ellipsoidal values for length and area using spatialite?

I have spatialite geometry data stored in a spatialite database in WGS 84 (EPSG 4328) format: SELECT Srid(geometry) FROM shape_layer; > 4326 When geometry is being returned as text, it is ...
2
votes
3answers
739 views

Ogr2Ogr SQLite Geometry Functions

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 ...
2
votes
1answer
93 views

Problem while Reprojecting

When I try to transform geometries from SRID 2321 to 4326, the transformed coordinates are swapping. Why is this happening? Below are the details Source SRID - EPSG:2321 Source Data Projection ...
2
votes
1answer
490 views

special python library needed for spatialite?

It appears that pyspatialite is very outdated. Do I need a special library like pyspatialite in order to use the spatial functions of spatialite? Or can I just connect to the database via the normal ...
2
votes
1answer
377 views

In what situations would SpatiaLite be selected over PostGIS, and vice versa?

I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage? The dataset is something like < ...
2
votes
1answer
1k views

Queries on virtual network in Spatialite only make errors

I've installed Spatialite 2.4 in Ubuntu. I try to convert an osm file into a roads network using this tutorial and make searches on it, but the queries only produce "no column" errors. $ ...
2
votes
1answer
39 views

How to rename ogr2ogr tables on export to Spatialite?

I'm exporting data from PostGIS to Spatialite using ogr2ogr. The export is working properly, except I need to be able to rename the tables that are being exported. Here's the command I'm using: ...
2
votes
1answer
108 views

OSM import: some features are missing

After importing OSM-Data to my qgis-project (as SpatiaLite database and/or shapefile-extract from planet.osm), some features are missing or have no attribute values. For example that lake: ...
2
votes
1answer
135 views

QGIS and SpatiaLite database: Setting user access permissions

SpatiaLite databases seems to match all my desires to store GIS layers and table. But an important question is: is it possible to limit writing to only one user ? If yes, what is the way to do it? I ...
2
votes
1answer
194 views

Why are layers imported into a DB with Spatialite-Gui locked from editing?

I have a Spatialite DB which I have imported some shp files too using Spatialite-Gui. I have full read-write access to these layers via the Spatialite-Gui, however when I open these layers from QGIS I ...
2
votes
1answer
193 views

How to compile QGIS from source with custom pyspatialite 4.0.0?

I have turned WITH_PYSPATIALITE ON, but I have a custom build of SpatiaLite (4.0.0), not the packaged version, so I set WITH_INTERNAL_SPATIALITE to OFF. How do I tell QGIS to configure PYSPATIALITE ...
2
votes
2answers
324 views

Specifying a file for VirtualShape in SpatiaLite [closed]

I'm fairly very new to spatialite, and am stuck on something very basic. I'm creating a virtual table from a shapefile using virtualshape. This works fine when the shapefiles are in the same folder ...
2
votes
3answers
49 views

Need to extract OSM data for my area from 2 neighbor countries

I need to prepare offline background data for my area of interest which is located around border between Czech Republic and Germany. I need to convert the OSM data to spatialite and then to use in ...
2
votes
1answer
32 views

Is there an equivalent to ST_Rotate in spatialite?

I'd like to do some arbitrary rotation of spatial objects in spatialite (accessed through QGIS). In PostGIS I'd use something like: ... SELECT geom AS ST_Rotate(geom, radians, originX, originY) Is ...
2
votes
1answer
113 views

spatialite - azimuth function not available

I am working with last spatialite versions on both Windows (7) and Ubuntu (13.10). I installed these from reference spatialite website. For both, version that I downloaded is 4.1.1 (nevertheless in ...