These are the geometry coordinates that make up the shape of the edge. The
shape of the lanes in the .net.xml are derived by applying a lateral offset.
Am Mo., 4. Feb. 2019 um 15:15 Uhr schrieb :
> Hello,
>
> I have found a way to use the patch files and to alter them by
> seeing the runner.py
Hello,
I have found a way to use the patch files and to alter them by
seeing the runner.py found here
https://github.com/eclipse/sumo/blob/master/tests/tools/sumolib/patch_network/runner.py . I still don't quite grasp how I can read the existing python
documentation.
Moving on, I
Hello again,
I understood what plain-xml. It is the editable version of the
network that consists of nod.xml, edg.xml, con.xml typ.xml. I also
have found out from the examples in the site that you can access those
files like so:
for edge in sumolib.output.parse('out.edg.xml', ['edge'],
Hello,
Could you please tell me what do you mean by converting the network
to plain-xml?
Isn't net.xml plain-xml? I can not find sufficient documentation for
sumolib.xml.parse.
In addition how could I use said patch files in an existing network?
Thank you for your help,
Tom
Quoting
To change a node position you can create a patch file like this:
netconvert -s old.net.xml -n patch.nod.xml -o patched.net.xml
This can be done in ~4 lines of python so you won't get a big advantage
from using sumolib.xml.parse.
However, there is also some sample code linked from the wiki:
Hello,
The only supported way to create networks is via netconvert. For
programmatic modifications you can either:
a) - convert the network to plain-xml
- modify those (sumolib.xml.parse can help with that. It creates
objects that allow attribute access and which can write themselves back
Hello,
I was wondering if I can have any programmatic access to netedit so
I can change my network from code or any other way I can change a road
network from code for that matter.
I wouldn't want to reinvent the wheel by creating an xml parser and editor.
Thank you,
Tom