[GIS] How to turn sqlite lat/lon columns to spatialite geometry

spatialitesqlite

I have a sqlite database with a table that has a column for longitude and one for latitude. Is there a way to make this data base 'spatial'?

Best Answer

I've described the process of installing and spatially enabling an sqlite db here: SpatiaLite Quick Start. Basically, you need to get init_spatialite-2.3.sql and run it on your db.

You can then create point geometries using this function:

MakePoint( x Double precision , y Double precision , [ , SRID Integer] ) : Geometry