Change osm bonus pack input file - openstreetmap

I am using osmbonuspack library in my project to find the route between a departure and a destination node and I want to save information related to the traversal time of the edges. So I keep a file which contains the nodes and edges of a specific city (OSM data). My problem is that for a specific route, osmbonuspack returns a road that doesn't agree with my file. I mean that when I search for two nodes of the route in my file, they exist, but there isn't an edge between them, while osmbonuspack has found an edge between them.
I know that this may is happening because I keep information only for a city, so this edge in my file is probably split into more nodes and edges.
But is there any way that I can change an input file or url in osmbonuspack so that it searches for a route in my .osm file?

No way: OSMBonusPack only provides access to online route services.
For offline routing using local map files, you can try GraphHopper Android.

Related

AnyLogic: How i know i have multiple networks and solve that problem?

The agent is not following the outlined path for moving to its destination
because destination is in different network.
How i know i have multiple networks and how to avoided that. So agents move on the path.
You can get the number of networks by calling getNetworks().
You can loop through them using
for (INetwork currentNetwork :getNetworks()) {
// do something with currentNetwork
}
Check my current video series on making networks a lot more powerful, including the problem of having several networks: https://www.benjamin-schumann.com/blog/2022/8/6/taking-control-of-your-network-agent-based-pathfinding
to see if you have multiple networks, you can check on the projects panel
Here you will see all the networks you have, and what nodes are contained inside each network.
AnyLogic doesn't know automatically how to connect these 2 networks if you want to do it, so you need to have attention to details when you build your networks.
if your agent move between nodes that are not in the same network, you will get unexpected results
When paths and the destination **node" do not connect with each other, then the agent does not follow the path and uses the shortest path to reach its destination.
A Network is the collection of paths and nodes that we create on canvas.
If we create multiple collections of paths and nodes and do not connect one collection with the other, then they act as separate networks.

Reading file from Google Drive with Talend

I need to read an uploaded file in Google Drive and perform X transformation with it. As per my reading, the single way to do it is by downloading the file to my local machine with the Talend component and then, reading from there.
If it is correct, I cannot figure what would be the file name assuming that I don't want to use the exact name of the file.
I found http://meowbi.com/2018/02/23/getting-google-sheet-gdrive-talend/ and it is exactly what I need - read from Google Drive, check the file name and proceed if the file name is X. What is unclear for me is what they used in tJava.
The output schema of tGoogleDriveList component's Main row contains a field name that is the file name you're looking for. Using Iterate row is less straightforward as you need to extract values from GlobalMap. In the article you cited they get file name by "tGoogleDriveList_1_TITLE" key of the GlobalMap.
Main row between tGoogleDriveList and tJava
For more details please look into the Talend Reference for Google Drive components. The Listing files and folders in Google Drive section should be particularly topical for your case.

Importing data from postgres to cytoscape

I have been trying to load some gis data from a postgis database into Cytoscape 3.6. I am trying to get some inDegree and outDegree values I have used the sif file format.
As long as the data is written out in the follow format
source_point\tinteracts with\ttarget_point
Cytoscape is happy to read it.
I am just wondering if there is anyway of including my own metric for the cost of getting between source_point and target_point
Sure! There are several ways to read in text files into Cytoscape -- SIF is just one of them. I would create a file that looks like SIF, but is actually a more complete text file:
Source\tTarget\tScore
source_point\ttarget_point\t1.1
...
And then use the "File->Import Network->File", choose your source and target and leave score as an edge attribute. You can have as many attributes on each line as you want, and can even mix edge attributes, source node attributes, and target node attributes.
-- scooter

How to split a full address to city, zip code in tableau

I am using tableau's paid version. I have a lat, lon for an address and the full address it self. I want to display a map view with the ability to drill down to state and zip code code level. I cannot create a hierarchy as the state and zip code fields are not available separately. Any clue how to move forward.
If your full address is just one big text field, you have to split it into separate feilds first and then build a hierarchy. Depending on the quality of your data you can either do it outside Tableau in your original datasource or use calculated fields.

Creating POI on the routes in SUMO

Is it possible to make POIs on the routes of SUMO automatically?
I want to have the locations of Base stations along the routes that cars or pedestrians move. I have manhattan.net.xml and manhattan.rou.xml as network file and route file in SUMO. I want to create the POI file that has POIs along side the routes with some distance from street.
Is it possible to create this POI file automatically?
Thanks.
No, it is not possible to generate this directly from sumo or the sumo-gui.
If you are willing to write a small python script however, you get a lot of support functions in the tools directory of your sumo installation. There is even a script which does almost what you want: tools/route/tracegenerator.py. This one generates points along the route. You will have to add the offset and adapt the output format to generate POIs. Maybe write to the mailing list for more help: http://sumo.dlr.de/wiki/Contact