SpatiaLite and Java

194 views
Skip to first unread message

Simone.Giannecchini

unread,
Mar 26, 2009, 6:24:03 PM3/26/09
to SpatiaLite Users
Hi there,
quick question, has anyone made any experiments on using spatialite
from java? If not is there anyone who has any thoughts about this.

I am interested in using it for geotools/geoserver.

Simone.

Justin Deoliveira

unread,
Mar 27, 2009, 2:06:50 AM3/27/09
to spatiali...@googlegroups.com
Ciao Simone,

I did some quick experiments building a geotools datastore based on
spatialite and results were promising. I was able to get something
working but it did require a patch to the jdbc driver:

http://www.ch-werner.de/javasqlite/

...that i never quite submitted back to the maintainer. I also had the
issue that I could never properly compile the java bindings on mac os.

If you are interested I can send you the code I have, or just commit it
as an unsupported module in geotools.

-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

bejay....@googlemail.com

unread,
Mar 27, 2009, 2:59:54 AM3/27/09
to SpatiaLite Users
Hi,

On Mar 27, 2:06 am, Justin Deoliveira <jdeol...@opengeo.org> wrote:
> Ciao Simone,
>
> I did some quick experiments building a geotools datastore based on
> spatialite and results were promising. I was able to get something
> working but it did require a patch to the jdbc driver:
>
> http://www.ch-werner.de/javasqlite/

Great news! I also tried to use spatialite from java. But
unfortunately
I didn't come that far, because of many reason. Here is my approach:
http://www.nabble.com/SQLite.Exception:-not-authorized-(to-load-a-shared-library-with-SQLite-Java-Wrapper-JDBC-Driver)-td22076105.html

> ...that i never quite submitted back to the maintainer. I also had the
> issue that I could never properly compile the java bindings on mac os.
>
> If you are interested I can send you the code I have, or just commit it
> as an unsupported module in geotools.

If possible, I would prefer (and very happy) that you commit it as an
unsupported module in geotools.

Thank you very much. Keep up the good work.

bejay

[....]

Justin Deoliveira

unread,
Mar 27, 2009, 1:11:47 PM3/27/09
to spatiali...@googlegroups.com
Yes, this was precisely what I had to patch. I think the security issue
can be kept minimal as long as loading extension is disabled by false.

I will try find some time next week to commit my work and share what I
have done to date.

-Justin

Simone Giannecchini

unread,
Mar 27, 2009, 1:45:28 PM3/27/09
to spatiali...@googlegroups.com
Ciao Justin,
yeah, I'd go ahead and commit it. I have this crazy idea of using
spatialite as an embedded db to store coverages info inside plugins. I
am specifically talking about large mosaics or pyramids.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928


http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

Shyam

unread,
Apr 1, 2009, 11:31:14 PM4/1/09
to SpatiaLite Users
Hi Justin,

I am interested in the tweaks that you made to SQLite driver. Can you
please let me know if you have already committed the code. If not, can
you please share the code with me.

Thanks,
Shyam

On Mar 27, 11:06 am, Justin Deoliveira <jdeol...@opengeo.org> wrote:
> Ciao Simone,
>
> I did some quick experiments building a geotools datastore based on
> spatialite and results were promising. I was able to get something
> working but it did require a patch to the jdbc driver:
>
> http://www.ch-werner.de/javasqlite/
>
> ...that i never quite submitted back to the maintainer. I also had the
> issue that I could never properly compile thejavabindings on mac os.
>
> If you are interested I can send you the code I have, or just commit it
> as an unsupported module in geotools.
>
> -Justin
>
> Simone.Giannecchini wrote:
> > Hi there,
> > quick question, has anyone made any experiments on using spatialite
> > fromjava? If not is there anyone who has any thoughts about this.
>
> >  I am interested in using it for geotools/geoserver.
>
> > Simone.
>
> --
> Justin Deoliveira
> OpenGeo -http://opengeo.org

Justin Deoliveira

unread,
Apr 20, 2009, 6:43:06 PM4/20/09
to spatiali...@googlegroups.com
Hi Shyam,

Sorry for the delayed reply. Actually downloading the latest version of
the driver it seems the original issue was fixed. The issue in question
was allowing extensions to be loaded through the java api, but it seems
there is now a configure time option to allow this. I wrote up some of
my findings in a blog post if you are interested.

http://blog.jdeolive.com/2009/04/spatialite-and-java.html

I have since started working on a geotools driver for spatialite. I have
committed an initial version of it into svn:

http://svn.osgeo.org/geotools/trunk/modules/unsupported/jdbc-ng/jdbc-spatialite/

However, i have found a new issue with the javasqlite driver that
prevents writing through geotools in some cases. I have posted to the
sqlite users list and am awaiting a reply.

-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Reply all
Reply to author
Forward
0 new messages