benstadin / spatialite4-jdbc Goto Github PK
View Code? Open in Web Editor NEWJDBC library for SpatiaLite 4.2+
License: BSD 2-Clause "Simplified" License
JDBC library for SpatiaLite 4.2+
License: BSD 2-Clause "Simplified" License
Sorry for this issue @benstadin , but I could not find any way to contact you. Is there any way we could support you to move this project forward? We would be very interested in a mac OS build that does not dynamically link against sqlite and we would need a Windows build. My email address is on my profile page if you want to get in touch directly.
Current publishing schema is pretty inconvenient. It would be cool to have this lib in the maven central or any other public repository.
我按照示例代码初始化数据库的时候,特别慢,找了很久原因如下:
Statement stat = connection.get().createStatement();
//不传参,这行sql会特别慢
//stat.execute("SELECT InitSpatialMetaData()");
//网友提供解决方法
stat.execute("SELECT InitSpatialMetaData(1);");
stat.close();
具体原因还没弄明白,希望可以得到解答
Hi!
i'm using your library with jdbc input logstash to connect my DB sqlite to elasticsearch.
My goal is to pass statement with spatialite function directly in logstash like this.
config file:
input {
jdbc {
# SQLite jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc.spatialite:BGR.db"
# The user we wish to execute our statement as
jdbc_user => ""
# The path to our downloaded jdbc driver
jdbc_driver_library => "spatialite-jdbc-4.3.0a.jar"
# The name of the driver class for SQLite
jdbc_driver_class => "org.spatialite.JDBC"
# our query
statement => "SELECT ST_LENGTH(GEOMETRY), id, val_longr FROM bgr_infrm"
}
output {
elasticsearch {index => bgr}
stdout { codec => rubydebug }
}
In this config file what is the right jdbc_connection_string ?
make native OS_NAME=Windows OS_ARCH=amd64
use this command for building windows dll.
but get error:
COMPILER_PATH=/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/:/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/:/usr/lib/gcc/x86_64-w64-mingw32/
LIBRARY_PATH=/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/:/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/../../../../x86_64-w64-mingw32/lib/
COLLECT_GCC_OPTIONS='-I' 'target/freexl-1.0.5/headers' '-I' 'target/freexl-1.0.5/src' '-I' 'target/zlib-1.2.8' '-I' 'target/lzma-4.32.7/src' '-I' 'target/libxml2-2.9.2/include' '-I' 'target/proj-4.8.0/src' '-I' 'target/geos-3.5.0/include' '-I' 'target/libiconv-1.14/include' '-I' 'target/spatialite-Windows-amd64' '-I' 'target/sqlite-amalgamation-3110100' '-I' 'target/libspatialite-4.3.0a/src/headers' '-I' 'target/libspatialite-4.3.0a/src/include' '-D' 'JNI_IMPLEMENTATION' '-I' 'lib/inc_win' '-O2' '-I' '/usr/lib/jvm/java-8-openjdk-amd64/include/linux' '-o' 'target/spatialite-Windows-amd64/spatialitejdbc.dll' '-shared' '-v' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/collect2 -m i386pep --shared -Bdynamic -e DllMainCRTStartup --enable-auto-image-base -o target/spatialite-Windows-amd64/spatialitejdbc.dll /usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/../../../../x86_64-w64-mingw32/lib/dllcrt2.o /usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/../../../../x86_64-w64-mingw32/lib/crtbegin.o -L/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix -L/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/../../../../x86_64-w64-mingw32/lib --kill-at --out-implib libexample_dll.a target/spatialite-Windows-amd64/NativeDB.o target/spatialite-Windows-amd64/sqlite3.o target/libspatialite-4.3.0a/src/.libs/libspatialite.a target/freexl-1.0.5/src/.libs/libfreexl.a target/geos-3.5.0/capi/.libs/libgeos_c.a target/geos-3.5.0/src/.libs/libgeos.a target/proj-4.8.0/src/.libs/libproj.a target/libxml2-2.9.2/.libs/libxml2.a target/zlib-1.2.8/libz.a target/lzma-4.32.7/src/sdk/7zip/Compress/LZMA/libLZMA.a target/libiconv-1.14/lib/.libs/libiconv.a target/libspatialite-4.3.0a/src/virtualtext/.libs/libvirtualtext.a -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt /usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/../../../../x86_64-w64-mingw32/lib/crtend.o
target/libspatialite-4.3.0a/src/.libs/libspatialite.a(libsplite_la-spatialite.o): could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:208: recipe for target 'target/spatialite-Windows-amd64/spatialitejdbc.dll' failed
make: *** [target/spatialite-Windows-amd64/spatialitejdbc.dll] Error 1
This looks great. So for those of us who need a windows version and are stuck in dll-hell with the sqlite/mod_spatialite.dll nightmare, what do we need to do to make this happen?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.