Questions tagged [spatialite]

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

Spatialite is a spatial extension to SQLite, providing vector geodatabase functionality

  • It extends SQLite's existing spatial support to cover the OGC's SFS specification
  • It is a single file spatial database (the whole spatial SQL engine is directly embedded within the application itself)

Spatialite in Wikipedia

699 questions
13
votes
7 answers

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.
GuidoS
  • 1,174
  • 5
  • 16
  • 32
10
votes
3 answers

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! However, if I ask it to just do it for one parcel in map1,…
ajl
  • 101
  • 1
  • 3
9
votes
5 answers

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?
johannes
  • 1,143
  • 9
  • 18
7
votes
1 answer

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 "field1" value. I have a Spatial Index in Geometry and…
Alexandre Neto
  • 14,212
  • 2
  • 58
  • 85
6
votes
1 answer

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 (i.e. adjacent) zip codes. If I do the following…
Ana
  • 101
  • 1
4
votes
1 answer

ST_Touches function in Spatialite

I'm a newbie to Spatialite so forgive me if the answer to my question is obvious...(I tried looking online but couldn't find the answer to this question). I am trying to use the function ST_touches in Spatialite Gui but it says it does not recognize…
Ana
  • 101
  • 1
4
votes
1 answer

MakeLine with aggregate based on line id

I want to create a line between points 104 and 74. This works : select 1 as axe, make_line(p1.geometry, p2.geometry) as geometry from MR200_amers_plan p1, MR200_amers_plan p2 where p1.matricule = 104 and p2.matricule = 74 Now I can't get the same…
Leehan
  • 1,236
  • 2
  • 10
  • 20
3
votes
2 answers

Is there any way of dividing a polygon into multiple different polygons using SpatiaLite?

I have a SpatiaLite dataset (with the projection EPSG:4326) with the following content: I'd like to find a way of dividing this polygon into multiple smaller polygons... Something like the following: Is there any way of creating a grid on my…
raylight
  • 1,241
  • 4
  • 19
3
votes
1 answer

Initialise a database with SpatiaLite 4.3

I am starting to work with SpatiaLite 4.3 in an empty database. SpatiaLite requires a number of meta-data tables, where it stores information about geometry fields. For previous versions there are SQL scripts that create and initialise these tables;…
Luís de Sousa
  • 3,935
  • 1
  • 29
  • 61
3
votes
0 answers

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 presented. The failure occurs in the first phase of…
2
votes
1 answer

Spatialite: Convert polygon to multi-polygons based on common field

I have a list of polygons which should be multipolygons: PK_UID | PolygonID | Geometry ------------------------------ 1 | 1 | polygon 2 | 2 | polygon 3 | 1 | polygon How do I convert them to multipolygons in…
Phil Donovan
  • 980
  • 11
  • 20
2
votes
1 answer

SQL to get points within certain distance

I got about 2 million points in a spatialite database would like to get which points are withina radius of 30 km from another point. All data is in WGS84 but I need distance in km. Also it would be handy to summarize by some field I tried spatial…
Antonio Locandro
  • 580
  • 3
  • 13
2
votes
1 answer

How can I create a new geometry column of points with the first value of a geometry column of polygons?

Let's say I have a Spatialite database filled with polygons. I've learned on this question that I can have as many geometry columns as I want in my database. So, I'd like to find a way of getting a result where I get the first pair of lat and long…
raylight
  • 1,241
  • 4
  • 19
2
votes
1 answer

How can I filter values using a regular expression on SpatiaLite?

I know that on PostgreSQL I can filter columns using a regular expression as the following: select * from mytable WHERE mycolumn ~ '^word.*' It works perfectly fine on PostregreSQL. However if I try this same syntax on SpatiaLite I see the…
raylight
  • 1,241
  • 4
  • 19
2
votes
0 answers

Error in commit changes to Spatialite database

I have developed a cadastral application with QGIS 2.18.13. The cadastral plots are stored as polygons (WKB type "Polygons") in a Spatialite database, a number of attributes is included. This worked well for a while but now I am facing a commit…
1
2 3 4