Questions tagged [sqlite]

A self-contained SQL database engine.

Filter by
Sorted by
Tagged with
1
vote
1answer
22 views

Why does the AddGeometryColumn function not exist in RSQLite?

I am trying to add the geometry to a new table with the following statement: library(RSQLite) # db.sqlite was created with spatialite-gui con <- dbConnect(RSQLite::SQLite(), dbname = "C:/GIS/db....
0
votes
0answers
18 views

Calculating shortest route in Geopackage/SQLite

Are there any graph analysis tools written for a SQLite database? What I'm looking for is something akin to pgRouting but for SQLite. I can't find anything with a significant user base, which is ...
0
votes
0answers
12 views

Error when running v.net.distance

I'm running grass76 on CentOS 7. When I have a network map (generated using v.net) with layer 1 having the arcs and layer 2 and 3 having the sets of nodes that I need to connect. Details are as ...
0
votes
0answers
19 views

ogr2ogr sqlite dialect can't find functions

my question might be related to this Dissolve using ogr2ogr gives 'no such function: ST_union' What I am trying is st_unioning my landparcel polygons based on its group. The code is very ...
1
vote
1answer
27 views

Transforming a GeoPackage table's geometry column into GeoJSON?

I have a GeoPackage that is downloaded to client devices for a mobile app. I need the clients to query the GeoPackage to retrieve a GeoJSON representation of the geom column. I'm familiar with ...
1
vote
1answer
30 views

Error when importing shapefile as vector layer into GRASS GIS

I'm tried to importing an Esri shapefile into GRASS GIS using both v.in.ogr and v.in.import however methods fail with the following error message: WARNING: Table <roadsSriLanka> linked to ...
0
votes
0answers
49 views

Running SpatiaLite K-Nearest Neighbors search (VirtualKNN) in Python?

I was using python to run the spalite KNN search (pleasse see code below), but the python terminated without showing anything (no errors). It seems that this query makes python crash. Can anybody ...
1
vote
0answers
28 views

Removing layer from database in PyQGIS?

I've got a PyQGIS 3 project up and running with a .sqlite database, with which I'm adding layers to with a QgsVectorFileWriter, without too many issues so far. However I've noticed that once a ...
3
votes
0answers
41 views

PyQgis 3 - Add New Layer to Spatialite Database

For the most part, working with QGIS layers has been a pleasure, but I've run into some difficulties recently when trying to create a new vector layer in the SQLite database I've been using. I've ...
0
votes
1answer
29 views

Saving default layer name to spatialite/geopackage table?

I'm a huge fan of being able to save default symbology to spatialite/geopackage tables, however, I don't like that when I import a table as a layer it takes on the name "database name table_name". ...
2
votes
0answers
69 views

Why ST_Distance give something different to 0?

I have this SQL: select ST_Distance(GeomFromText('POINT(-0.338767 39.55425)', 4326), geom) dis1, ST_Distance(GeomFromText('POINT(-0.338767 39.55425)', 4326), geom, 1) dis2, AsEWKT(geom) ...
2
votes
1answer
35 views

GDAL SQLite geometry error

I am having the following issue writing points to a SQLite file using ogr with SPATIALITE enabed: ERROR 1: Cannot insert feature with geometry of type POINTZ in column GEOMETRY. Type POINT expected ...
3
votes
0answers
57 views

Processing a Sqlite table in standalone QGIS application

I have been trying to use a single table of a Spatialite db in a standalone Python application. I have run it through the QGIS interface to find how it used the input pathway, which was: 'dbname=\'C:/...
0
votes
0answers
39 views

Loading spatialite tables into GeoPandas GeoDataFrame

Using information from here, I am trying to load a result of a SQL Python selection into a Geopandas geodataframe. I know pyspatialite is not longer maintained, so have tried using the dbapi2 module ...
1
vote
1answer
37 views

Determining whether the geometry field in a SQLite table has z coordinates using Python

In the Shapely package, there is a function that allows you to determine whether coordinates include a Z value. It is object.has_z. Is there a way that a similar command can be carried on the ...
0
votes
1answer
144 views

Error: Geometry constraint geom-type or SRID not allowed. How to ensure the correct geom-type?

Following the top answer on a previous question about storing geometries in a spatialite database, I am trying to update a spatialite table using: engine.execute("SELECT AddGeometryColumn('your_table'...
0
votes
0answers
63 views

Loading and displaying NDS (Navigation Data Standard // SQLlite)?

On QGIS 3.4 (Windows), I would like to load and display NDS (Navigation Data Standard) data (attributes and geometry). I succeed in loading NDS data sample from openlanemodel. Via the QGIS DB manager,...
0
votes
1answer
110 views

Difference between MapBox mbtiles and offline mbtiles for MapBox Android SDK

I know what have some difference between MapBox mbtiles and offline mbtiles for MapBox Android SDK. In offline mbtiles for SDK besides tiles contains: Style JSON. All fonts and icons associated ...
2
votes
1answer
47 views

Valid datetime in GeoPackage

I am adding spatial objects to a GeoPackage database. To register a new spatial table I use a formulation like: INSERT INTO gpkg_contents (table_name, data_type, identifier, description, ...
1
vote
0answers
66 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
51 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
19 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
72 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
58 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
56 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
25 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
84 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
37 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
141 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
105 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
352 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
229 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
307 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
196 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 ...
2
votes
0answers
79 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
65 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
172 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
20 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 ...
1
vote
1answer
366 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
394 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
316 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
45 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 ...
4
votes
2answers
748 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
137 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
651 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 -...
2
votes
0answers
187 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
75 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
147 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
467 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
430 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 ...