android-spatialite icon indicating copy to clipboard operation
android-spatialite copied to clipboard

How to use Spatialite Virtual Routing Network

Open phprad opened this issue 6 years ago • 20 comments

Hi, Thanks for great library. Am using the library to run spatialite queries which works perfects.

But when i tried to run Spatialite virtual routing query based on this link

Am getting this error

no such module: VirtualRouting (code 1): , while compiling: SELECT * FROM roads_net WHERE NodeFrom=? AND NodeTo=?

on Android but when i run it on the Spatialite_GUI and Spatialite CLI everything works perfect.

Thanks for your support Best regards.

phprad avatar Aug 06 '19 16:08 phprad

The repository contains an android binary of spatialite 4.3.0a. The module VirtualRouting is available in spatialite 5.0.0 and not in 4.3.0a. On your side works because you have tested on a Spatialite_GUI with built-in 5.0.0 version.

retsef avatar Aug 06 '19 21:08 retsef

Please anyway to upgrade the spatialite binary in the android repository to use the spatialite 5.0.0.

The repository contains an android binary of spatialite 4.3.0a. The module VirtualRouting is available in spatialite 5.0.0 and not in 4.3.0a. On your side works because you have tested on a Spatialite_GUI with built-in 5.0.0 version.

phprad avatar Aug 07 '19 15:08 phprad

At this time the 5.0.0 is currently in beta. If you want you can do it your self and make a pull request.

retsef avatar Aug 07 '19 18:08 retsef

At this time the 5.0.0 is currently in beta. If you want you can do it your self and make a pull request.

I wish I know how to do this. I searched the internet to the best of my knowledge on how I can use the spatialite 5.0.0 along with your library but couldn't find anything.

Please kindly help me in any way. Regards.

phprad avatar Aug 09 '19 09:08 phprad

Any luck with this I have been trying to do the same but couldn't figure it out. Any help appreciated. Thanks

emman-ok avatar Aug 13 '19 18:08 emman-ok

Hi, as far as I remember this wrapper is not configured to compile with the virtualrouting module. I could check but at earliest this weekend.

On Tue, Aug 13, 2019, 21:22 emman_ok [email protected] wrote:

Any luck with this I have been trying to do the same but couldn't figure it out. Any help appreciated. Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sevar83/android-spatialite/issues/9?email_source=notifications&email_token=AAA5FVOCA6KEV33STPOLPYDQEL3VBA5CNFSM4IJYDNJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4GRC6I#issuecomment-520950137, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5FVP6CVQMDWSIIE37YWTQEL3VBANCNFSM4IJYDNJA .

sevar83 avatar Aug 13 '19 20:08 sevar83

Please any luck with the new update.

Thanks

phprad avatar Aug 19 '19 02:08 phprad

I'll take a look today.

On Mon, Aug 19, 2019, 05:41 phprad [email protected] wrote:

Please any luck with the new update.

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sevar83/android-spatialite/issues/9?email_source=notifications&email_token=AAA5FVIA4STTQKCW2GKXFOTQFIB6NA5CNFSM4IJYDNJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4RQ2PY#issuecomment-522390847, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5FVKXBKTP3LTICSFGNCDQFIB6NANCNFSM4IJYDNJA .

sevar83 avatar Aug 19 '19 07:08 sevar83

I'll take a look today. …

Hi Svetlozar, How's it going... Any update yet.

emman-ok avatar Aug 21 '19 11:08 emman-ok

Hey, I did some maintenance work, migrated to AndroidX and trying to address any crashes first. I'll try to put Spatialite 5.0.0-beta0 in a separate branch but honestly - not sure if I'll have enough time.

On Wed, Aug 21, 2019 at 2:00 PM emman_ok [email protected] wrote:

I'll take a look today. …

Hi Svetlozar, How's it going... Any update yet.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sevar83/android-spatialite/issues/9?email_source=notifications&email_token=AAA5FVMVW34OZVKM4JR6EYLQFUN3JA5CNFSM4IJYDNJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ZJCDY#issuecomment-523407631, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5FVNOENSGYGTOPJ2IJFTQFUN3JANCNFSM4IJYDNJA .

sevar83 avatar Aug 21 '19 11:08 sevar83

hello @sevar83 any update on the library, i also need to make use of the VirtualRouting module.

by the way grate library thanks for that.

dsaved avatar Aug 29 '19 16:08 dsaved

Hi @dsaved @emman-ok @phprad, I'm currently updating the build configuration to update to Spatialite-5.0.0-beta0. Is this the exact version you need? Also are there some specific requirements for newer GEOS, Proj (and other dependencies) versions? Because I'll first try if it works with the currently set versions (GEOS 3.4.2 and Proj 4.8.0) and if I have time I'll be updating those too.

sevar83 avatar Aug 30 '19 15:08 sevar83

Yes Spatialite-5.0.0-beta. I believe the other module works well with the Spatialite-5.0.0-beta version

dsaved avatar Aug 30 '19 16:08 dsaved

Looks like Spatialite 5 requires GEOS 3.6+. So I updated GEOS to 3.7.2. But there are other exotic compiler issues with some files. I'm working on them.

On Fri, Aug 30, 2019 at 7:41 PM Daniel Johnson [email protected] wrote:

Yes Spatialite-5.0.0-beta. I believe the other module works well with the Spatialite-5.0.0-beta version

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sevar83/android-spatialite/issues/9?email_source=notifications&email_token=AAA5FVPCLX2ZFD6QVJRJUTTQHFESDA5CNFSM4IJYDNJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5SFIMY#issuecomment-526668851, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5FVNBHR3FM3J2RS7GS6TQHFESDANCNFSM4IJYDNJA .

sevar83 avatar Aug 30 '19 20:08 sevar83

Ok, on the spatialite5 branch we have:

  • Updated GEOS 3.4.2 to 3.7.2
  • Updated Proj 4.8.0 to 4.9.3
  • Updated Spatialite 4.3.0a to 5.0.0-beta0
  • Added librttopo 1.1.0
  • Not added JSON-C library yet. Don't see problem without it. What it is used for? I could see if I can add it maybe next week if I find time.

The spatialite5 branch may be merged with master when Spatialite 5 final gets released. Before that use:

implementation 'com.github.sevar83:android-spatialite:spatialite5-SNAPSHOT'

(hopefully JitPack will manage to build it as their server seems down at the moment)

If you have any issues or requests please let me know. Cheers guys, tomorrow I'm going in a tent in the wild for the weekend. :)

sevar83 avatar Aug 30 '19 22:08 sevar83

Am so happy about this. Thanks very much for your time. Will test and give you feedback.

Thanks for your great support. Have a wonderful weekend.

phprad avatar Aug 31 '19 07:08 phprad

IMPORTANT LICENSING CHANGES:

Unfortunately the spatialite5 branch licensing policy must be reduced to the more restrictive GPL than the license for the master branch (which is Apache License 2.0). This is necessary because the VirtualRouting functionality is based on the code from RtTopo library and GCP. Those 2 things are released under GPL and GPL dictates that any redistributable software that is built against GPL libraries should be also licensed under GPL.

TL;DR:

  • spatialite5 branch will include VirtualRouting + GCP but will become GPL 2.0
  • master branch will remain Apache License 2.0. When Spatialite 5.0 becomes stable it will be merged without the GPL-based parts (VirtualRouting and GCP support).

sevar83 avatar Sep 01 '19 17:09 sevar83

Hello Sevar,

I have tried to include the plugin, But getting this error

ERROR: Failed to resolve: com.github.sevar83:android-spatialite:spatialite5-SNAPSHOT Show in Project Structure dialog Affected Modules: app

I don't know if the Jit Server is still down. Kindly advice.

Thanks.

phprad avatar Sep 03 '19 11:09 phprad

Hi, jitpack.io returns a white page at the moment. As a workaround you may clone the repo, checkout the spatialite5 branch, build it yourself and then use maven install command to install it in your local maven repository.

On Tue, Sep 3, 2019, 14:57 phprad [email protected] wrote:

Hello Sevar,

I have tried to include the plugin, But getting this error

ERROR: Failed to resolve: com.github.sevar83:android-spatialite:spatialite5-SNAPSHOT Show in Project Structure dialog Affected Modules: app

I don't know if the Jit Server is still down. Kindly advice.

Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sevar83/android-spatialite/issues/9?email_source=notifications&email_token=AAA5FVKHQSIB2F76FZVOZULQHZGLXA5CNFSM4IJYDNJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5X6MDA#issuecomment-527427084, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5FVO7S46EEQU52GO4LITQHZGLXANCNFSM4IJYDNJA .

sevar83 avatar Sep 04 '19 05:09 sevar83

Hi, jitpack.io returns a white page at the moment. As a workaround you may clone the repo, checkout the spatialite5 branch, build it yourself and then use maven install command to install it in your local maven repository.

I can confirm that this works to build it locally, however when doing this I came across an issue which is the same reason that the jitpack build is failing:

ndk-modules/librttopo/librttopo-1.1.0/headers/librttopo.h:30:10: fatal error: 'librttopo_geom.h' file not found
#include "librttopo_geom.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.

(See: https://jitpack.io/com/github/sevar83/android-spatialite/spatialite5-dac0cc1652-1/build.log)

To fix this you need to run the autoconf script which will generate the missing header files for librttopo:

cd projectdir/android-spatialite/lib/src/main/jni/ndk-modules/librttopo/librttopo-1.1.0 ./autogen.sh ./configure

However I have no idea how to configure jitpack to do this.

jamesingham avatar Nov 15 '19 11:11 jamesingham