eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.55k stars 1.43k forks source link

Improve the file format for storing/loading gui-selections (trac #489) #489

Closed behrisch closed 6 years ago

behrisch commented 13 years ago

right now we have a plaintext format of the form <prefix>:<microsimID>

lane:a17 junction:23 poi:wurstbude

suggested xml:

<selections>
  <selection type="lane" ids="foo bar baz" />
  <selection type="edge" ids="..." />
  <selection type="shape" ids="" />
</selections>

should type equal GUIGLObjectType should we use the prefix? ("e3 detector", "induct loop", ...)

Migrated from http://sumo.dlr.de/ticket/489

{
    "status": "new", 
    "changetime": "2011-05-04T12:08:33Z", 
    "description": "right now we have a plaintext format of the form ''<prefix>:<microsimID>''\n\nlane:a17\njunction:23\npoi:wurstbude\n\nsuggested xml:\n\n<selections>\n  <selection type=\"lane\" ids=\"foo bar baz\" />\n  <selection type=\"edge\" ids=\"...\" />\n  <selection type=\"shape\" ids=\"\" />\n</selections>\n\nshould type equal GUIGLObjectType should we use the prefix? (\"e3 detector\", \"induct loop\", ...)\n", 
    "reporter": "namdre", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1304510913000000", 
    "component": "other (also unclassified)", 
    "summary": "Improve the file format for storing/loading gui-selections", 
    "priority": "minor", 
    "keywords": "", 
    "time": "2011-04-14T10:53:57Z", 
    "milestone": "1.0.0", 
    "owner": "namdre", 
    "type": "enhancement"
}
behrisch commented 13 years ago

@namdre commented:

there could be name clashes between pois and poly but we could also resolve this by replacing GLO_SHAPE with GLO_POI and GLO_POLY

behrisch commented 13 years ago

@dkrajzew commented:

I like the format.

behrisch commented 13 years ago
behrisch commented 6 years ago

I am not sure here but tend to favor a new format to have everything in xml.

namdre commented 6 years ago

The advantage of the current format (at least for me) is that it lends itself to quick edits with a text editor: e.g. by transforming a lane selection into an edge selection or by quickly building an selection from a list of ids. Some of this would no longer be feasible with XML. Also: it's basically a set of IDs. No attributes and no nesting. XML is quite a heavy tool for that.

behrisch commented 6 years ago

Don't have such a strong opinion here and since no one asked for such a long time ...