Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Spatialite Virtual Routing Network #9

Open
phprad opened this issue Aug 6, 2019 · 20 comments
Open

How to use Spatialite Virtual Routing Network #9

phprad opened this issue Aug 6, 2019 · 20 comments

Comments

@phprad
Copy link

phprad commented Aug 6, 2019

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.

@retsef
Copy link

retsef commented Aug 6, 2019

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
Copy link
Author

phprad commented Aug 7, 2019

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.

@retsef
Copy link

retsef commented Aug 7, 2019

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.

@phprad
Copy link
Author

phprad commented Aug 9, 2019

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.

@emman-ok
Copy link

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

@sevar83
Copy link
Owner

sevar83 commented Aug 13, 2019 via email

@phprad
Copy link
Author

phprad commented Aug 19, 2019

Please any luck with the new update.

Thanks

@sevar83
Copy link
Owner

sevar83 commented Aug 19, 2019 via email

@emman-ok
Copy link

I'll take a look today.

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

@sevar83
Copy link
Owner

sevar83 commented Aug 21, 2019 via email

@dsaved
Copy link

dsaved commented Aug 29, 2019

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.

@sevar83
Copy link
Owner

sevar83 commented Aug 30, 2019

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.

@dsaved
Copy link

dsaved commented Aug 30, 2019

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

@sevar83
Copy link
Owner

sevar83 commented Aug 30, 2019 via email

@sevar83
Copy link
Owner

sevar83 commented Aug 30, 2019

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. :)

@phprad
Copy link
Author

phprad commented Aug 31, 2019

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.

@sevar83
Copy link
Owner

sevar83 commented Sep 1, 2019

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).

@phprad
Copy link
Author

phprad commented Sep 3, 2019

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.

@sevar83
Copy link
Owner

sevar83 commented Sep 4, 2019 via email

@jamesingham
Copy link

jamesingham commented Nov 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants