Creating POI on the routes in SUMO - openstreetmap

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

Related

Optimizing openmaptiles and servers for planet tiles generation

I'm currently using openmaptiles in order to generate planet tiles (zoom 0 to 14 or 15). This is a long process that I plan run on dedicated servers.
I know that this is a service offered by openmaptiles but I can't afford spending $1200 or $1000 to generate or buy the tiles.
It's written in the README of openmaptiles project that the quickstart.sh isn't optimized for planet rendering. This is why I'd like to know how I could optimize the configuration to make it as fast as possible.
To be clear, I will use mbutils to generate tiles from mbtiles file, allowing me to run the planet generation on different servers with different zoom levels (i.e zoom 1 to 9 on a first server, and 10 to 14 on another one). This way, I will collect different mbtiles files that I will use to generate and merge .pbf tiles with mbutils.
I read an issue but it didn't change anything for me.
Maybe I can also remove some layers that won't be used on my map ? (How to do that ?)
ATM, when I run a script, it doesn't seem that it's using the full CPU capacities.
Thanks for your help
I found a way to accelerate the process:
Make a PR of openmaptiles/generate-vectortiles repo that contains the dockerfile of the main container for this project.
In the background, this container uses mapbox's tilelive project that allows to split a big job in smaller ones.
I added two environment variables:
JOBS: The number of job it should be splitted in
JOB_NUM: The job number to run
The fork is here: https://github.com/qlerebours/generate-vectortiles
It allows to paralellize the process if you have multiple servers to generate this.
you can restrict layers returned by modifying: https://github.com/openmaptiles/openmaptiles/blob/master/openmaptiles.yaml
Inside openmaptiles.yaml - reduce the layers entry so it contains the only layers that you require.
For example, I only required building data so I changed the file so that the layers section only contained the following.
layers:
- layers/building/building.yaml
I worked this out by going through the history of the openmaptiles repository. It worked for me.
Hope this helps! If you find another ways to speed up the process, it would be good to share!
Thanks
-Rufus

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

Running Netlogo headless on the cloud

I've written a NetLogo model to model agent movement in a landscape. I'd like to run this model from the command prompt, using AWs/Google Compute. The model uses about 500MB worth of input rasters and shapefiles and writes rasters and csv files. It also uses the extensions gis, rnd, cf, table and csv.
Would this be possible using the Controlling API? (https://github.com/NetLogo/NetLogo/wiki/Controlling-API). Can I just use the steps listed in the link? I have not tried running NetLogo from the command prompt before.
Also, I do not want to run BehaviourSpace as it is not relevant to this model.
A BehaviorSpace experiment can consist of only a single run, so BehaviorSpace may actually be relevant to you here. You only need to write one short XML file (or no new files at all, if the experiment setup you want is already part of the model) to do it this way.
Whereas if you go through the controlling API, you will have to write and compile Java (or Scala) code, which is a substantially more complex task.
But if you decide to go the controlling API route: yes, that works too, and it is documented, as you've already noticed.

Change osm bonus pack input file

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.

Exporting NetLogo data to graph with nodes and edges

I have created some links between agents (turtles) in NetLogo. This links will change at each time step. My aim is to export this data (i.e., turtles and links b/w them) to graph with vertices (turtles) edges (links), which can be given as input to Gephi. Is it possible to see the changes which occurs in netlogo in the graph when it is linked with Gephi. Can someone help me out. Thanks.
To export your network data in a format usable by Gephi, I would suggest using the nw:save-graphml primitive from NetLogo's NW Extension. This will give produce a file in the GraphML file format, which Gephi can read.
I guess you could re-save your network at each time step and overwrite your file, but I'm not sure if Gephi can display your changes dynamically. And depending on the size of your network, it might be slow.
Are you trying to use Gephi to see how the network changes over time, in a changing network that is generated by NetLogo? That's what #NicolasPayette's answer suggests, so I'll make the same assumption.
Gephi can display "dynamic graphs", i.e. networks that change over time. My understanding is that are two file formats that allow Gephi to import dynamic graphs: GEXF, and a special CSV (comma-separated) format that Gephi calls "Spreadsheet". Nicolas mentioned GraphML, which is a very nice network data format, but it doesn't handle dynamic graphs. And as far as I know, NetLogo doesn't generate GEXF or Gephi's "Spreadsheet" format.
However, the Gephi Spreadsheet format is very simple, and it would not be difficult to write a NetLogo procedure that would write a file in that format. This procedure would write new rows to the "Spreadsheet" CSV file on each NetLogo tick. Then Gephi could read in the file, and you'd be able to move back and forth in time, seeing how the graph changes. (You might need to use a bit of trial and error to figure out how to write Spreadsheet files based on the description on the Gephi site.)
Another option would be to display the evolving graph online using the graphstream protocol. Plugins for NetLogo as well as for gephi provide support for this.