From 9e8c36793bfbb17c2f67371cc7f9aa8b9202fdc4 Mon Sep 17 00:00:00 2001 From: joelondon Date: Fri, 15 Mar 2019 05:06:45 +0000 Subject: [PATCH] Update spatialite.rst (#413) a line of sql added to create the idx_ in the python recipe --- docs/spatialite.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/spatialite.rst b/docs/spatialite.rst index 5a8a31b1..58179e70 100644 --- a/docs/spatialite.rst +++ b/docs/spatialite.rst @@ -68,6 +68,8 @@ Here's a recipe for taking a table with existing latitude and longitude columns, UPDATE events SET point_geom = GeomFromText('POINT('||"longitude"||' '||"latitude"||')',4326); ''') + # Now add a spatial index to that column + conn.execute('select CreateSpatialIndex("museums", "point_geom");') # If you don't commit your changes will not be persisted: conn.commit() conn.close()