The King is dead, long life the King

156 views
Skip to first unread message

Alessandro Furieri

unread,
Apr 19, 2018, 5:29:14 AM4/19/18
to SpatiaLite Users
1. the classic VirtualNetwork module is now declared as obsolete
   and deprecated. VirtualNetwork will still continue to be supported
   by the next-to-come libspatialite-5.0.0 just to avoid an abrupt
   breakage of cross-version compatibility, but it will probably
   be removed from future versions.
   
2. the brand new VirtualRouting module is a more sophisticated
   and flexible full replacement; adopting VirtualRouting for
   any new development is warmly recommended.
   
The sources implementing VirtualRouting are immediately available
from the Fossil repository.

VirtualRouting is fully documented in this Wiki page:

A short list of the cool new features supported by VirtualRouting:

- few new SQL functions now allow to directly create a VirtualRouting  
  starting from a Spatial Table of the LINESTRING type representing
  a Network:
  * CreateRouting()
  * CreateRouting_GetLastError()
  * CreateRoutingNodes()
  
- classic Shortest Path queries are obviously supported 
- VirtualRouting can now support multiple-destination
- TSP too (Traveling Salesman Problem) is now supported
- Isochrones are supported
- finally, Point-to-Point queries (not requiring to exactly
  identify a NodeFrom and a NodeTo and just based on two
  generic PointFrom and PointTo) are now supported.
  
enjoy,
Sandro

antonio valanzano

unread,
Apr 29, 2018, 7:13:49 AM4/29/18
to SpatiaLite Users
Dear List members
waiting for the release of version 5 with Virtual Routing
how can I solve a  multi-destination shortest path problem using version 4.4 and Virtual Network?

I have 1 origin and 500 destinations and the  only way I know to solve this problem is to write
500 queries specifying the origin-node and each one of the destination nodes.

Is there a more efficient method to do this ?

Antonio Valanzano

a.fu...@lqt.it

unread,
May 1, 2018, 1:44:39 PM5/1/18
to spatiali...@googlegroups.com
On Sun, 29 Apr 2018 04:13:49 -0700 (PDT), antonio valanzano wrote:
> Dear List members
> waiting for the release of version 5 with Virtual Routing
> how can I solve a  multi-destination shortest path problem using
> version 4.4 and Virtual Network?
>

ciao Antonio,

the old VirtualNetwork was completely unable to solve multiple
destination shortest path problems.
if it's now deprecated and will be replaced in all future versions
of libspatialite by the brand new VirtualRouting is exactly because
this latest has been re-designed and re-implemented from scratch
so to overcome such limitations.


> I have 1 origin and 500 destinations and the only way I know to
> solve this problem is to write
> 500 queries specifying the origin-node and each one of the
> destination
> nodes.
>
> Is there a more efficient method to do this ?
>

yes, you just have to use the latest sources (5.0.0-devel) available
from the Fossil repository.
building by yourself an experimental/testing version starting from
sources is basically simple on every Linux; but unhappily it's kind
of a naughty nightmare on Windows.

bye Sandro

Majid Hojati

unread,
May 8, 2018, 6:48:33 AM5/8/18
to SpatiaLite Users
Is there any precompiled version for windows? I can compile it on linux but windows is a big problem for me

Andrew Harfoot

unread,
May 8, 2018, 9:48:44 AM5/8/18
to spatiali...@googlegroups.com
Hi Antonio,

I have successfully tackled this using the Isochrone query syntax shown in this page:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=VirtualNetwork+reloaded

If the cost limit is set to be very large, then the returned table will cover the whole network and will report the cost to reach every node. This can then be filtered for the destination node IDs. The drawback to this method is that the route line itself is not returned.

Alternatively you can automate the writing of the 500 queries by using a CROSS JOIN to feed into the call to the virtual network:
https://groups.google.com/forum/#!topic/spatialite-users/9L_H5FrVIIU

However, you may encounter the issues that I had:
https://groups.google.com/forum/#!topic/spatialite-users/YZ5Lp9N_n4U

Cheers,

Andy
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To post to this group, send email to spatiali...@googlegroups.com.
Visit this group at https://groups.google.com/group/spatialite-users.
For more options, visit https://groups.google.com/d/optout.


-- 
Andy Harfoot

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

Tel:  +44 (0)23 8059 2719

www.geodata.soton.ac.uk

mj10777

unread,
May 8, 2018, 9:56:14 AM5/8/18
to SpatiaLite Users


On Tuesday, 8 May 2018 15:48:44 UTC+2, Andrew Harfoot wrote:
Hi Antonio,

I have successfully tackled this using the Isochrone query syntax shown in this page:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=VirtualNetwork+reloaded

If the cost limit is set to be very large, then the returned table will cover the whole network and will report the cost to reach every node. This can then be filtered for the destination node IDs. The drawback to this method is that the route line itself is not returned.

Alternatively you can automate the writing of the 500 queries by using a CROSS JOIN to feed into the call to the virtual network:
https://groups.google.com/forum/#!topic/spatialite-users/9L_H5FrVIIU

However, you may encounter the issues that I had:
https://groups.google.com/forum/#!topic/spatialite-users/YZ5Lp9N_n4U

Have you tried this with the new VirtualRouting to determine if these difficulties still apply? 


Mark

Andrew Harfoot

unread,
May 9, 2018, 5:44:53 AM5/9/18
to spatiali...@googlegroups.com
On 08/05/2018 14:56, 'mj10777' via SpatiaLite Users wrote:


On Tuesday, 8 May 2018 15:48:44 UTC+2, Andrew Harfoot wrote:
Hi Antonio,

I have successfully tackled this using the Isochrone query syntax shown in this page:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=VirtualNetwork+reloaded

If the cost limit is set to be very large, then the returned table will cover the whole network and will report the cost to reach every node. This can then be filtered for the destination node IDs. The drawback to this method is that the route line itself is not returned.

Alternatively you can automate the writing of the 500 queries by using a CROSS JOIN to feed into the call to the virtual network:
https://groups.google.com/forum/#!topic/spatialite-users/9L_H5FrVIIU

However, you may encounter the issues that I had:
https://groups.google.com/forum/#!topic/spatialite-users/YZ5Lp9N_n4U

Have you tried this with the new VirtualRouting to determine if these difficulties still apply? 


Mark

I haven't attempted to compile version 5.0 of Spatialite to test the new VirtualRouting functions yet. However, I believe Sandro go to the bottom of my original issues with the VirtualNetwork and fixed the bug that was causing them, however, binaries containing the bug fix have yet to be release as far as I know.

Andy
Reply all
Reply to author
Forward
0 new messages