Skip to content
Test to load SpatiaLite on x64 Windows7 and Python 3
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

SpatiaLite test on Python

This example loads SpatiaLite extension and intializes spatially enabled SQLite database at the given location. Then as a test, creates 100 thousand points, linestrings and polygons.

Uses SQLite that comes with python 3. Loads SpatiaLite dll as typical SQLite 3 extension.

Project contains all mod_spatialite dlls that come with mod_spatialite-4.3.0a-win-amd64 package from

With other OS, Python and SpatiaLite version combinations, take care to load the correct bit versions.

Tested with versions:

  • OS: x64 Windows7

  • Python: 64 bit 3.5.1, 64 bit 3.6.1

  • SpatiaLite: mod_spatialite-4.3.0a-win-amd64


Launch IDLE from your Python distribution, then from it open, and execute with F5.

Edit the call to createGeoDB (last line in the and replace with your setup, if neeeded; first argument is path to the database relative to the script, and the second is path to the mod_spatialite.dll directory.

First, it should create a spatially enabled 5,4 Mb sqlite database in TestOut directory. Then, during test it should store several hundred thousand new entries, enlarging db up to 46 Mb.

You can’t perform that action at this time.