https://github.com/springmeyer/sqlite3-mapnik
standalone build of mapnik sqlite plugin
https://github.com/springmeyer/sqlite3-mapnik
Last synced: 7 months ago
JSON representation
standalone build of mapnik sqlite plugin
- Host: GitHub
- URL: https://github.com/springmeyer/sqlite3-mapnik
- Owner: springmeyer
- Created: 2011-08-25T17:44:23.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-12-19T23:42:21.000Z (over 14 years ago)
- Last Synced: 2024-12-28T18:28:08.091Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.68 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sqlite-mapnik
Standalone sqlite plugin
## Setup
Unpack and build sqlite3
cd deps
mkdir -p build
tar xvf sqlite-autoconf-3070900.tar.gz
cd sqlite-autoconf-3070900/
export CFLAGS="-DSQLITE_ENABLE_RTREE=1 -O3 -fPIC"
./configure --prefix=`pwd`/../build --enable-static --disable-shared
make -j4 && make install
cd ../../
Plugin Mapnik's sqlite plugin locally
git clone git://github.com/mapnik/mapnik.git mapnik_sources
cp -r mapnik_sources/plugins/input/sqlite sqlite_sources
Now, make any changes to the mapnik sqlite sources and build locally like:
make
To be able to test your local `sqlite.input` you need to move the globally installed one aside:
mv `mapnik-config --input-plugins`/sqlite.input sqlite_plugin.backup
## Test
If you have node and node-mapnik installed do:
node test.js
If not install node-mapnik with npm:
npm install mapnik
The `node test.js` should print some json about the data.
## Done testing?
Move the old sqlite plugin back into place:
mv sqlite_plugin.backup `mapnik-config --input-plugins`/sqlite.input
## Troubleshooting
If the plugin compiles but mapnik does not recognize it as valid, try
opening it with python's ctypes which may reveal linking errors:
import ctypes
ctypes.CDLL('./sqlite.input')