Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sqlite]

A self-contained SQL database engine.

1
vote
0answers
34 views

GRASS: import PostGIS vector layer into SQLite database

I am working with vector layers (points) composed of more than 100 000 geometries. These layers are originally in a PostGis database and I import them with v.in.ogr, using a formulation like: v.in....
0
votes
1answer
36 views

Importing NAS Data into SQLite database? [closed]

I'm trying to import German NAS-Data into a SQLite- Spatialite-database. For this I use the following command: ogr2ogr -f SQLITE --config OGR_SQLITE_CACHE 8192 -gt 65536 -skipfailures -s_srs "+proj=...
1
vote
1answer
11 views

Python SQLite JSONSTRINGLIST

I have converted an XML (NAS) - File into a SQLite-Database using ogr2org - which worked quite well. Now I'd like to read the data using Python (3.72) - which works quite good as well. But there is a ...
2
votes
0answers
22 views

How to delete openmaptiles (OSM Mbtiles) layers

I am struggling with converting PBF to Postgresql Table (importing only certain layers) or editing them, for the volume of the data. (world scale of PBF is about 80Gbs) meanwhile, I have found that ...
1
vote
1answer
17 views

Add FID to attribute table using ogrinfo

I want to add the fid to the attribute table using ogrinfo in OSGeo4W Shell. Here is my code: ogrinfo layer.shp -sql "ALTER TABLE layer ADD COLUMN ID integer" ogrinfo layer.shp -dialect SQLite -...
1
vote
0answers
27 views

Using QgsVectorFileWriter to write several layers on same Spatialite file?

Does anybody knows how to write several QGIS layers on a same spatialite file using QgsVectorFileWriter or another way to add several same layers type to a Spatiallite specific table using ...
0
votes
0answers
15 views

Delete rows or tables from mbtiles

I have downloaded mbtiles from openmaptiles.org and I am trying to remove layers that I do not need using DB Browser for SQLite. What I am trying to get rid of is the ocean layer and I do not know ...
0
votes
2answers
54 views

SQLite spatial function

I have a SQLite database, with point and linestring geometries. Between the points(blue) and the linestring(green) is a gap, which I want to close with another line(red). The line should have angle of ...
0
votes
0answers
32 views

Get a column from database and populate the shapefile attributes?

I would like to know how to get copy a specific columns from the database and add that column in a shapefile attribute table? I am open to other better ideas.
3
votes
0answers
72 views

Loading editable SQLite layer in QGIS?

I converted a shapefile to a SpatiaLite database so I could work with attributes with a length longer than 254 characters, and also not see some columns and change their order. In QGIS 2.18.16 I have ...
0
votes
1answer
39 views

Can a Geopackage style be deleted through SQL window in DB Manager?

I am trying to clean up a Geopackage and as part of this I would like to delete some styles from the "layer_styles" table. I have tried doing this with the below query in the SQL window of the DB ...
2
votes
1answer
140 views

How to open and add SQLite connection to browser with PyQgis

I have a code to open the layers of a SQLite database. When executing this code, the layers are loaded correctly (1 & 2). However i also need to connect to the database and show the connection in ...
0
votes
1answer
98 views

Can multiple MapBox vector tile mbtiles be merged just using SQLite?

Is it possible to combine two vector mbtiles files using just SQLite? I noticed this question Joining several raster .mbtiles? but it does not seem to work with vector files. I also came across ...
-2
votes
1answer
159 views

Difference between SQLite and SpatiaLite? [closed]

I wrote telegram bot for my uni project that receives from user spatial and non-spatial data (coordinates and user identity) and puts them in an SQLite database. Then when I extract this database and ...
1
vote
1answer
81 views

Adding SQLite layers to ArcGIS Pro throws error “Exception from HRESULT: 0x80041538”

I have a SQLite database which I have just created in QGIS and I want to open it in ArcGIS Pro. In Catalog I have added the database to the project but when I try to add layers to the map I get the ...
1
vote
0answers
38 views

Losing data when offline editing in QGIS?

I am working with QGIS 2.18.15 and I have a problem. I made an offline project, then a sent to my colleague, also the .sqlite file too. He edited it, made new objects and changed some attributes. Then ...
2
votes
0answers
54 views

Extracting polygons from mbtiles

Currently, one can extract features within a bounding box from an mbtiles file using tilelive-copy. However there is no way to extract features within a polygon from an mbtiles file. The mbtiles-...
0
votes
1answer
41 views

Mapcache + SQLite

i tried to configure mapcache to use with sqlite database, but i have some problems. I want make cache for four layers, but i dont know, how to do this. When i make more tilesets, i get error: ...
7
votes
1answer
108 views

Creating SpatiaLite view (for use in QGIS) from non-spatial SQLite database?

I have a plain SQLite database that contains X, Y coordinates in a table. Data are edited via an MS Access front-end using the ODBC driver and so I want to avoid storing them in a geometry blob that ...
0
votes
0answers
18 views

How to get the identify form to load with SQL query view?

I've loaded an SQL query on a table in a spaitalite database as a view. The view has loaded fine and the attributes table is showing all the data, but the Identify tool won't bring up a form. Is there ...
0
votes
1answer
199 views

How does QGIS 3.2.3 handle or create spatial indexes within a geopackage?

My frame of reference is: Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIterator for Spatialite Data Provider Spatial indexes in GeoPackage ...
1
vote
1answer
230 views

Installing Spatialite on Centos7: select mod_extension() doesn't work

I'm trying to install Spatialite on a CentOS 7 server. Sqlite (version 3.7.17 ...), works fine. Using the command yum list | grep spatial the result is the follow So I've installed Spatialite ...
2
votes
1answer
167 views

How do I insert rows into a spatial table within a geopackage file via a SQL INSERT statement?

I am attempting to insert rows into a spatial table within a geopackage file using DBeaver 5.1.1. I receive an error from the triggers, referencing functions that don't exist: ST_IsEmpty. Do I need ...
0
votes
1answer
26 views

Loading format other than shapefile with ArcGIS runtime 100

I know how to load a feature table for ArcGIS runtime 100 in C# ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(Path); FeatureLayer fl= new FeatureLayer(myShapefile); But ...
3
votes
2answers
457 views

Importing Survey123 SQLite Database from Device

I need to import an SQLite database generated by ESRI Survey123 to a csv or some other useful format. I modified this script so that I can use arcToolbox to acquire input and output parameters. I am ...
1
vote
0answers
90 views

Adding SpatiaLite to Visual Studio project (already has SQLite)

I am very new to SpatiaLite. I am working on a large Visual Studio C++ project that already supports SQLite, and I am trying to add SpatiaLite capabilities to it. After reading the documentation and ...
1
vote
2answers
321 views

ogr2ogr mapFieldType giving an error

I am trying to convert a GeoJSON file into an SQLite database and I want to set to INTEGER a specific field in the SQLite final file. I use the following command line: ogr2ogr -f SQLite -...
0
votes
0answers
42 views

Which versions of ArcMap support editing SQLite geodatabase tables and in what capacity?

I am attempting to help a co-worker troubleshoot some issues with using SQLite geodatabase in ArcMap. But I am having a heck of time trying to work out what actually is/isn't supported at which ...
2
votes
0answers
151 views

ogrinfo: Unable to use sqlite dialect with -oo GEOM_POSSIBLE_NAMES open option

I am having problems using the SQLite SQL dialect to read a CSV file using ogrinfo, but only if I also specify a geometry column using the -oo GEOM_POSSIBLE_NAMES open option. Suppose file test.csv ...
0
votes
0answers
57 views

ogr2ogr: extract text elements from PDF into attributes

I have PDF created by the local geodetic authority which is kind of geospatial and contains layers of cadastre underground services (water, sewer, etc) as lines, points, and textual attributes ...
0
votes
0answers
102 views

Storing a Spatial Index in Sqlite

I would like to store an r-tree or quadtree index in a sqlite database using python. Does anyone know if there is any code to do this? A bit of background: The dataset cannot be moved to another ...
1
vote
2answers
282 views

How to connect to a SpatiaLite database using ogr in Python?

I need to connect to a SQLite/SpatiaLite database to copy data there. I have done the same with PostgreSQL/PostGIS like this: connection_string = "dbname={} user={} password={} host={} port={}"....
1
vote
2answers
242 views

Unique constraint for SpatialLite geometry column

I am creating a SpatiaLite database where I want to ensure that the contents of the geometry column for a table are unique. For normal SQL I would add a UNIQUE constraint to that column but, I don't ...
1
vote
2answers
80 views

How to make an arrow from a polygon centroid to a point

I would like to present in QGIS a graphical information I have in two vector layers, an arrow. One layer has catchemnt areas as polygons and the other has the outlet points. The catchment areas layer ...
1
vote
0answers
52 views

ESRI Runtime Geodatabase Shape storage

Does anyone out there know the geometry storage encoding for ESRI's Runtime Geodatabase (.sqlite) format? aka mobile geodatabase. There are GDB_ tables, st_ tables, RTREE indexes and other fairly ...
1
vote
0answers
80 views

SQLITE - Buffer 30 m

I have a DB in SQlite with several layers. I would like to perform a spatial analysis, by buffering several water lines with 30m from origin. I am using DB Manager in QGIS 2.14 and the SQL statement ...
0
votes
1answer
142 views

What is the max amount of connections a GeoPackage can handle in GeoServer?

I'm currently working on a GeoServer deployment and for simplicity, I want to to transition to using GeoPackages rather than Shapefiles (longer column names, less work integrating the data, etc.). As ...
4
votes
1answer
195 views

Sqlite ERROR: Too many connections: max 64

I would like to use the ST_SingleSidedBuffer SpatiaLite SQL function to create one-sided buffers around all lines in a layer. The following functions works fine, until the 64rd iteration. Then the ...
2
votes
1answer
106 views

How to reference piped input in ogr2ogr SQL statement

I have a geojson data set that I am piping into an an ogr2ogr command using /vsistdin/. However, I am having trouble figuring out how to actually refer to this input in the SQL statement I'm running. ...
2
votes
1answer
196 views

How to use spatialite SQL functions in GDAL/OGR

I would like to create one-sided buffer geometries around linestrings. I found this ST_SingleSidedBuffer SpatialLite function that I would like to use in my Python script. When I run the function ...
1
vote
0answers
159 views

Converting OSM.PBF to Geopackage in CLI?

I would like to refresh this tutorial for my purposes - background vector map in one file - just to load in QGIS. My idea is a script doing this: Import directly downloaded Openstreetmap PBF file (...
0
votes
0answers
279 views

How can I build GDAL/ogr for Android which supports sqlite driver with Android Studio?

I'm working on an Android application with Android Studio. I want to use GDAL/ogr C++ library to convert two vector formats. Here, I want to convert Sqlite/Spatialite database to ESRI Shapefile. I ...
4
votes
1answer
291 views

Spatial indexes in GeoPackage files

I'm working with GeoPackage files built with QGIS3. I tried to execute some spatial queries but it was really slow, so I'd like to speed it up with indexes. After some readings I tried create ...
0
votes
2answers
267 views

TileMap: How to convert MBTiles to RMaps SQLite?

These two map formats look very similar (based on SQLite and Tiled Maps). I am looking for method to convert maps from mbtiles to RMaps SQLite and vice versa without quality lost.
2
votes
1answer
155 views

Open a Spatialite database in PHP

I need to open a Spatialite database by using php in a php's framework. I've already work on a basic php file to test how it work but it gave me some errors. I've already try to load extension by ...
0
votes
0answers
152 views

Get tile images directly from sqlite database

I'm trying to get map tile images to display in my application. I created a sqlite database and used WMS Lite server to request map tiles using GetMap syntax. wmslite?SERVICE=WMS&VERSION&...
1
vote
1answer
285 views

Saving styles for all layers using PyQGIS - SLD, QML, databases

I wrote a script (for QGIS 3) that saves styles for all visible vector layers in QML and SLD files: import processing self=qgis.utils layers = self.iface.mapCanvas().layers() for layer in layers: ...
1
vote
1answer
260 views

Spatialite 4.3 err: no such function: gpkgAddGeomtryColumn

I'm opening a GeoPackage made by QGIS 2.18.17 then closing it and opening it with: spatialite_gui (spatialite lib loaded:4.3.0a) DB Browser (SELECT load_extension('mod_spatialite');) Spatialite libs ...
2
votes
1answer
77 views

Is it possible to replace the SQLite library in QGIS?

On Linux I was able to use the JSON1 extension by default on a layer from a SpatiaLite database connection, but on Windows (QGIS 3.0 via OSGeo4W) it isn't enabled. Is it possible to replace the SQLite/...
1
vote
1answer
121 views

How to use sqlite symdifference with ogr via command line

I am trying to use the sqlite symdifference function in windows command line with ogr but can't seem to get the syntax right. Here is what I have: ogr2ogr -dialect sqlite -sql "select symdifference(a....