temp-account10 / maps4mac

Automatically exported from code.google.com/p/maps4mac
0 stars 0 forks source link

[Linux] SQLite module does not support SpatiaLite #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./osm2spatialite.py myfile.sqlite myfile.osm

What do you see instead?
"ERROR: SQLite module does not support SpatiaLite"

What version of the product are you using? On what operating system?
Linux Ubuntu 11.10
Python 2.7.2
SQLite version 2.8.17
SpatiaLite version ..: 2.4.0
osm2spatialite-0.2.zip 

Please provide any additional information below.
Patch :
    ### found at http://code.google.com/p/pyspatialexamples/downloads/detail?name=SpatiaLite_Examples.py&can=2&q=
    # Load the spatialite extension of sqlite
    db.enable_load_extension(True)
    db.execute("select load_extension('libspatialite.so.2')")
    db.enable_load_extension(False)
    ###

Original issue reported on code.google.com by vpott...@gmail.com on 21 Nov 2011 at 11:18

GoogleCodeExporter commented 8 years ago
I've uploaded osm2spatialite-0.3.zip, which incorporates some Windows & Linux 
compatibility improvements. Could you see if the new version works for you?

Original comment by DanielS...@gmail.com on 22 Nov 2011 at 6:57

GoogleCodeExporter commented 8 years ago
Le 22/11/2011 07:58, maps4mac@googlecode.com a �crit :

Hi,
Thanks for your fast reaction.
I've tryed v 0.3 and its running. Thanks !
For the Shapely module, I have not seen the dependency in the 
documentation. Sorry...
I had an error on filling the spatial_ref_sys table that I did not 
report. but I see that it is already resolved.

Some suggestions for development :

It would be great if osm2spatialite shoud become a class invoked as
----
import osm2spatialite

osm2spatialite.osm2spatialite{
out="mydb.sqlite"
in = ["myfile1.osm","myfile2.osm"]
force=True,
default={...}
}
----

It would be nice if osm2spatialite could load several .osm files in one 
database like :
./osm2spatialite.py mydb.sqlite myfile1.osm myfile2.osm -c myconfig.py

I can try, some day, to make the loop in the osm2spatialite.py __main__ 
using the argparse module
http://docs.python.org/dev/library/argparse.html
...some day :-)

Thanks !

Original comment by vpott...@gmail.com on 22 Nov 2011 at 10:17

GoogleCodeExporter commented 8 years ago

Original comment by DanielS...@gmail.com on 23 Apr 2012 at 3:44