Hello,
here are some ideas:

solution1: change a single line of code:
src/netwrite/NWWriter_XML.cpp:192. Change from
if (!e-hasDefaultGeometry) {
to
if (true)

this will cause shapes to be written for all edges in .edg.xml output


solution2: write a python script using sumolib (requires the pyproj library)
when you load a network with
net = sumolib.readNet("myFile.net.xml")
you can access all edges and their lanes along with their shapes using
net.getEdges(), edge.getLanes(), lane.getShape()
you can convert all network coordinates back to lon,lat using
net.convertXY2LonLat(x,y)
then just write them in any format you need

regards,
Jakob





2015-08-08 16:44 GMT+02:00 Ben Postance <[email protected]>:

> Hi
>
> using SUMO 0.23
>
> I need to build line strings from my edge and lane definitions for use in
> external GIS.
>
> I have been using --proj.plain-geo to write geo coords, which works for
> the .edg file but not the .net file.
>
> Is there any way to get the plain geo for the .net, or at least all the
> lanes as well?
>
> This is an issue as within the .edg file some edges do not have a shape
> value so I must use the lane geometry; example below.
>
> I was originally working from an OSM export.
>
> Kind Regards
>
> Ben
>
>
>
> from my .net file
>
>     <edge id="-102843964" from="570891" to="1187610551" priority="9"
> type="highway.primary">
>         <lane id="-102843964_0" index="0" disallow="rail_urban rail
> rail_electric" speed="13.41" length="19.16" shape="140372.46,139717.14
> 140353.59,139715.68"/>
>         <lane id="-102843964_1" index="1" disallow="rail_urban rail
> rail_electric" speed="13.41" length="19.16" shape="140372.85,139713.86
> 140353.85,139712.39"/>
>     </edge>
>
> from my .edg file
>
>     <edge id="-102843964" from="570891" to="1187610551" priority="9"
> type="highway.primary" numLanes="2" speed="13.41">
>         <lane index="0" disallow="rail_urban rail rail_electric"/>
>         <lane index="1" disallow="rail_urban rail rail_electric"/>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to