JDBC Driver for SpatiaLite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

JDBC Driver for SpatiaLite

Joaquin Jose del Cerro Murciano
Hello everyone.
I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.

As base library I used "spatialite4-jdbc"

   https://github.com/benstadin/spatialite4-jdbc

For development I usually work with Ubuntu Linux.
Leaving aside blocking issues with the BBDD I have not had too many problems;
but when I have generated the first builds and have tried it on windows it gave the error:

   Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64

To my surprise, the jar does not include binaries for windows.

Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?

I would appreciate any help you can provide.

a greeting
Joaquin

-----------

Hola a todos.
Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.

Como libreria de base he usado "spatialite4-jdbc"

  https://github.com/benstadin/spatialite4-jdbc

Para desarrollo suelo trabajar con Ubuntu Linux.
Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:

  java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64

Para mi sorpresa, el jar no incluye los binarios para windows.

¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?

Agradeceria cualquier ayuda que podais brindar.

Un saludo
Joaquin

--
--------------------------------------
Joaquin Jose del Cerro Murciano
Development and software arquitecture manager at gvSIG Team
[hidden email]
[hidden email]
gvSIG Association
www.gvsig.com
www.gvsig.org

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Driver for SpatiaLite

Andrea Antonello
Hi Joaquin,
we are succefully using: https://github.com/xerial/sqlite-jdbc

Cheers,
Andrea







On Sun, Aug 6, 2017 at 8:58 PM, Joaquin Jose del Cerro Murciano <[hidden email]> wrote:
Hello everyone.
I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.

As base library I used "spatialite4-jdbc"

   https://github.com/benstadin/spatialite4-jdbc

For development I usually work with Ubuntu Linux.
Leaving aside blocking issues with the BBDD I have not had too many problems;
but when I have generated the first builds and have tried it on windows it gave the error:

   Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64

To my surprise, the jar does not include binaries for windows.

Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?

I would appreciate any help you can provide.

a greeting
Joaquin

-----------

Hola a todos.
Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.

Como libreria de base he usado "spatialite4-jdbc"

  https://github.com/benstadin/spatialite4-jdbc

Para desarrollo suelo trabajar con Ubuntu Linux.
Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:

  java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64

Para mi sorpresa, el jar no incluye los binarios para windows.

¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?

Agradeceria cualquier ayuda que podais brindar.

Un saludo
Joaquin

--
--------------------------------------
Joaquin Jose del Cerro Murciano
Development and software arquitecture manager at gvSIG Team
[hidden email]
[hidden email]
gvSIG Association
www.gvsig.com
www.gvsig.org

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel


_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Driver for SpatiaLite

Joaquin Jose del Cerro Murciano


2017-08-07 7:51 GMT+02:00 andrea antonello <[hidden email]>:
Hi Joaquin,
we are succefully using: https://github.com/xerial/sqlite-jdbc


Thank you Andrea.
Xerial / sqlite-jdbc is a driver for Sqlite.

Do you know any for SpatiaLite?

 
Cheers,
Andrea







On Sun, Aug 6, 2017 at 8:58 PM, Joaquin Jose del Cerro Murciano <[hidden email]> wrote:
Hello everyone.
I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.

As base library I used "spatialite4-jdbc"

   https://github.com/benstadin/spatialite4-jdbc

For development I usually work with Ubuntu Linux.
Leaving aside blocking issues with the BBDD I have not had too many problems;
but when I have generated the first builds and have tried it on windows it gave the error:

   Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64

To my surprise, the jar does not include binaries for windows.

Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?

I would appreciate any help you can provide.

a greeting
Joaquin

-----------

Hola a todos.
Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.

Como libreria de base he usado "spatialite4-jdbc"

  https://github.com/benstadin/spatialite4-jdbc

Para desarrollo suelo trabajar con Ubuntu Linux.
Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:

  java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64

Para mi sorpresa, el jar no incluye los binarios para windows.

¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?

Agradeceria cualquier ayuda que podais brindar.

Un saludo
Joaquin

--
--------------------------------------
Joaquin Jose del Cerro Murciano
Development and software arquitecture manager at gvSIG Team
[hidden email]
[hidden email]
gvSIG Association
www.gvsig.com
www.gvsig.org

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel


_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel



--
--------------------------------------
Joaquin Jose del Cerro Murciano
Development and software arquitecture manager at gvSIG Team
[hidden email]
[hidden email]
gvSIG Association
www.gvsig.com
www.gvsig.org

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Driver for SpatiaLite

Andrea Antonello
Hi Joaquin,
>>
>>
>
> Thank you Andrea.
> Xerial / sqlite-jdbc is a driver for Sqlite.
>
> Do you know any for SpatiaLite?


Sorry, I didn't read properly at first. Now I understand.

I gave a quick look at the code of these jdbc drivers and from what I
can see the java API is simply the one of the jdbc, nothing added for
spatialite (I might be wrong).
That means that the xerial drivers should work the same way for you.

For example the code in here:

https://github.com/benstadin/spatialite4-jdbc/blob/master/demo/Spatialite.java

1) loads the spatialite native libraries
2) initializes the spatial part

With the xerial drivers this is done almost the same way:

https://github.com/moovida/jgrasstools/blob/master/dbs/src/main/java/org/jgrasstools/dbs/spatialite/jgt/SpatialiteDb.java

It looks more complex because we also support the rasterlite part, but
basically this loads the library:

stmt.execute("SELECT load_extension('mod_spatialite',
'sqlite3_modspatialite_init')");

and the method initSpatialMetadata inits the spatial part.


Am I missing something? I am not sure.

Ciao,
Andrea



>
>
>
>>
>> Cheers,
>> Andrea
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Aug 6, 2017 at 8:58 PM, Joaquin Jose del Cerro Murciano <[hidden email]> wrote:
>>>
>>> Hello everyone.
>>> I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.
>>>
>>> As base library I used "spatialite4-jdbc"
>>>
>>>    https://github.com/benstadin/spatialite4-jdbc
>>>
>>> For development I usually work with Ubuntu Linux.
>>> Leaving aside blocking issues with the BBDD I have not had too many problems;
>>> but when I have generated the first builds and have tried it on windows it gave the error:
>>>
>>>    Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64
>>>
>>> To my surprise, the jar does not include binaries for windows.
>>>
>>> Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?
>>>
>>> I would appreciate any help you can provide.
>>>
>>> a greeting
>>> Joaquin
>>>
>>> -----------
>>>
>>> Hola a todos.
>>> Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.
>>>
>>> Como libreria de base he usado "spatialite4-jdbc"
>>>
>>>   https://github.com/benstadin/spatialite4-jdbc
>>>
>>> Para desarrollo suelo trabajar con Ubuntu Linux.
>>> Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:
>>>
>>>   java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64
>>>
>>> Para mi sorpresa, el jar no incluye los binarios para windows.
>>>
>>> ¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?
>>>
>>> Agradeceria cualquier ayuda que podais brindar.
>>>
>>> Un saludo
>>> Joaquin
>>>
>>> --
>>> --------------------------------------
>>> Joaquin Jose del Cerro Murciano
>>> Development and software arquitecture manager at gvSIG Team
>>> [hidden email]
>>> [hidden email]
>>> gvSIG Association
>>> www.gvsig.com
>>> www.gvsig.org
>>>
>>> _______________________________________________
>>> gvSIG-desktop-devel mailing list
>>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>>
>>
>>
>> _______________________________________________
>> gvSIG-desktop-devel mailing list
>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>
>
>
>
> --
> --------------------------------------
> Joaquin Jose del Cerro Murciano
> Development and software arquitecture manager at gvSIG Team
> [hidden email]
> [hidden email]
> gvSIG Association
> www.gvsig.com
> www.gvsig.org
>
> _______________________________________________
> gvSIG-desktop-devel mailing list
> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Driver for SpatiaLite

Francisco Puga-2

2017-08-08 8:53 GMT+02:00 andrea antonello <[hidden email]>:
Hi Joaquin,
>>
>>
>
> Thank you Andrea.
> Xerial / sqlite-jdbc is a driver for Sqlite.
>
> Do you know any for SpatiaLite?


Sorry, I didn't read properly at first. Now I understand.

I gave a quick look at the code of these jdbc drivers and from what I
can see the java API is simply the one of the jdbc, nothing added for
spatialite (I might be wrong).
That means that the xerial drivers should work the same way for you.

For example the code in here:

https://github.com/benstadin/spatialite4-jdbc/blob/master/demo/Spatialite.java

1) loads the spatialite native libraries
2) initializes the spatial part

With the xerial drivers this is done almost the same way:

https://github.com/moovida/jgrasstools/blob/master/dbs/src/main/java/org/jgrasstools/dbs/spatialite/jgt/SpatialiteDb.java

It looks more complex because we also support the rasterlite part, but
basically this loads the library:

stmt.execute("SELECT load_extension('mod_spatialite',
'sqlite3_modspatialite_init')");

and the method initSpatialMetadata inits the spatial part.


Am I missing something? I am not sure.

Ciao,
Andrea



>
>
>
>>
>> Cheers,
>> Andrea
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Aug 6, 2017 at 8:58 PM, Joaquin Jose del Cerro Murciano <[hidden email]> wrote:
>>>
>>> Hello everyone.
>>> I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.
>>>
>>> As base library I used "spatialite4-jdbc"
>>>
>>>    https://github.com/benstadin/spatialite4-jdbc
>>>
>>> For development I usually work with Ubuntu Linux.
>>> Leaving aside blocking issues with the BBDD I have not had too many problems;
>>> but when I have generated the first builds and have tried it on windows it gave the error:
>>>
>>>    Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64
>>>
>>> To my surprise, the jar does not include binaries for windows.
>>>
>>> Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?
>>>
>>> I would appreciate any help you can provide.
>>>
>>> a greeting
>>> Joaquin
>>>
>>> -----------
>>>
>>> Hola a todos.
>>> Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.
>>>
>>> Como libreria de base he usado "spatialite4-jdbc"
>>>
>>>   https://github.com/benstadin/spatialite4-jdbc
>>>
>>> Para desarrollo suelo trabajar con Ubuntu Linux.
>>> Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:
>>>
>>>   java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64
>>>
>>> Para mi sorpresa, el jar no incluye los binarios para windows.
>>>
>>> ¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?
>>>
>>> Agradeceria cualquier ayuda que podais brindar.
>>>
>>> Un saludo
>>> Joaquin
>>>
>>> --
>>> --------------------------------------
>>> Joaquin Jose del Cerro Murciano
>>> Development and software arquitecture manager at gvSIG Team
>>> [hidden email]
>>> [hidden email]
>>> gvSIG Association
>>> www.gvsig.com
>>> www.gvsig.org
>>>
>>> _______________________________________________
>>> gvSIG-desktop-devel mailing list
>>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>>
>>
>>
>> _______________________________________________
>> gvSIG-desktop-devel mailing list
>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>
>
>
>
> --
> --------------------------------------
> Joaquin Jose del Cerro Murciano
> Development and software arquitecture manager at gvSIG Team
> [hidden email]
> [hidden email]
> gvSIG Association
> www.gvsig.com
> www.gvsig.org
>
> _______________________________________________
> gvSIG-desktop-devel mailing list
> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel



--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Este correo electrónico contiene información estrictamente confidencial y es de uso exclusivo del destinatario, quedando prohibida a cualquier otra persona su revelación, copia, distribución, o el ejercicio de cualquier acción relativa a su contenido. Si ha recibido este mensaje por error, por favor conteste a su remitente mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer los derecho de oposición, acceso, rectificación y cancelación de acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de diciembre, de Protección de Datos de Carácter Personal dirigiéndose a Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Driver for SpatiaLite

Joaquin Jose del Cerro Murciano
Gracias a los dos, a ver como acabo montandolo con esta informacion.

Un saludo
Joaquin


2017-08-08 18:01 GMT+02:00 Francisco Puga <[hidden email]>:

2017-08-08 8:53 GMT+02:00 andrea antonello <[hidden email]>:
Hi Joaquin,
>>
>>
>
> Thank you Andrea.
> Xerial / sqlite-jdbc is a driver for Sqlite.
>
> Do you know any for SpatiaLite?


Sorry, I didn't read properly at first. Now I understand.

I gave a quick look at the code of these jdbc drivers and from what I
can see the java API is simply the one of the jdbc, nothing added for
spatialite (I might be wrong).
That means that the xerial drivers should work the same way for you.

For example the code in here:

https://github.com/benstadin/spatialite4-jdbc/blob/master/demo/Spatialite.java

1) loads the spatialite native libraries
2) initializes the spatial part

With the xerial drivers this is done almost the same way:

https://github.com/moovida/jgrasstools/blob/master/dbs/src/main/java/org/jgrasstools/dbs/spatialite/jgt/SpatialiteDb.java

It looks more complex because we also support the rasterlite part, but
basically this loads the library:

stmt.execute("SELECT load_extension('mod_spatialite',
'sqlite3_modspatialite_init')");

and the method initSpatialMetadata inits the spatial part.


Am I missing something? I am not sure.

Ciao,
Andrea



>
>
>
>>
>> Cheers,
>> Andrea
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Aug 6, 2017 at 8:58 PM, Joaquin Jose del Cerro Murciano <[hidden email]> wrote:
>>>
>>> Hello everyone.
>>> I recently added SpatiaLite support to gvSIG, which will appear with 2.4.0.
>>>
>>> As base library I used "spatialite4-jdbc"
>>>
>>>    https://github.com/benstadin/spatialite4-jdbc
>>>
>>> For development I usually work with Ubuntu Linux.
>>> Leaving aside blocking issues with the BBDD I have not had too many problems;
>>> but when I have generated the first builds and have tried it on windows it gave the error:
>>>
>>>    Java.lang.Exception: No native library is found for os.name = Windows and os.arch = amd64
>>>
>>> To my surprise, the jar does not include binaries for windows.
>>>
>>> Does anyone know if there is a JDBC driver for SpatiaLite that works on windows and linux?
>>>
>>> I would appreciate any help you can provide.
>>>
>>> a greeting
>>> Joaquin
>>>
>>> -----------
>>>
>>> Hola a todos.
>>> Recientemente he añadido a gvSIG soporte para usar SpatiaLite, que aparecera con la 2.4.0.
>>>
>>> Como libreria de base he usado "spatialite4-jdbc"
>>>
>>>   https://github.com/benstadin/spatialite4-jdbc
>>>
>>> Para desarrollo suelo trabajar con Ubuntu Linux.
>>> Dejando de lado temas de bloqueos en la BBDD no he tenido demasiados problemas; pero cuando he generado los primeros builds y lo han probado en windows daba el error:
>>>
>>>   java.lang.Exception: No native library is found for os.name=Windows and os.arch=amd64
>>>
>>> Para mi sorpresa, el jar no incluye los binarios para windows.
>>>
>>> ¿ Alguien sabe si existe un driver JDBC para SpatiaLite que funcione en windows y linux ?
>>>
>>> Agradeceria cualquier ayuda que podais brindar.
>>>
>>> Un saludo
>>> Joaquin
>>>
>>> --
>>> --------------------------------------
>>> Joaquin Jose del Cerro Murciano
>>> Development and software arquitecture manager at gvSIG Team
>>> [hidden email]
>>> [hidden email]
>>> gvSIG Association
>>> www.gvsig.com
>>> www.gvsig.org
>>>
>>> _______________________________________________
>>> gvSIG-desktop-devel mailing list
>>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>>
>>
>>
>> _______________________________________________
>> gvSIG-desktop-devel mailing list
>> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel
>
>
>
>
> --
> --------------------------------------
> Joaquin Jose del Cerro Murciano
> Development and software arquitecture manager at gvSIG Team
> [hidden email]
> [hidden email]
> gvSIG Association
> www.gvsig.com
> www.gvsig.org
>
> _______________________________________________
> gvSIG-desktop-devel mailing list
> http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel



--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
<a href="tel:+34%20881%2092%2078%2008" value="+34881927808" target="_blank">+34 881927808

Este correo electrónico contiene información estrictamente confidencial y es de uso exclusivo del destinatario, quedando prohibida a cualquier otra persona su revelación, copia, distribución, o el ejercicio de cualquier acción relativa a su contenido. Si ha recibido este mensaje por error, por favor conteste a su remitente mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer los derecho de oposición, acceso, rectificación y cancelación de acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de diciembre, de Protección de Datos de Carácter Personal dirigiéndose a Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel



--
--------------------------------------
Joaquin Jose del Cerro Murciano
Development and software arquitecture manager at gvSIG Team
[hidden email]
[hidden email]
gvSIG Association
www.gvsig.com
www.gvsig.org

_______________________________________________
gvSIG-desktop-devel mailing list
http://joinup.ec.europa.eu/mailman/listinfo/gvsig-desktop-devel