Skip to content

Commit 66f5ffc

Browse files
authored
How to create KNN table if it is missing
1 parent f28a3ac commit 66f5ffc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spatialite/knn.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ curl 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojso
1515
```
1616
This will create a `usgs.db` SpatiaLite database with a spatial index.
1717

18+
This should have a `knn` virtual table already. If one does not exist you can create one like this:
19+
20+
sqlite-utils --load-extension=spatialite usgs.db 'CREATE VIRTUAL TABLE knn USING VirtualKNN();'
21+
1822
Open it in Datasette like this:
1923

2024
```bash

0 commit comments

Comments
 (0)