-
Notifications
You must be signed in to change notification settings - Fork 179
faq 111614359
by Abdullah Binthunaiya on 2017-08-30 18:02:06
Hello,
I have created MATSim network from an .OSM file, with WGS 84 projection system. the links Distances have changed after converting .osm to MATSim Network XML:
<link id="877" from="-55099" to="-82169" length="7.746421801959955E-5" freespeed="22.22222222222222" capacity="1500.0" permlanes="1.0" oneway="1" modes="car" origid="-82179" type="primary" />
<link id="8770" from="-43838" to="-36304" length="0.007504830678239832" freespeed="22.22222222222222" capacity="3000.0" permlanes="2.0" oneway="1" modes="car" origid="-43850" type="primary" />
<link id="8771" from="-52025" to="-52036" length="6.090397116230199E-4" freespeed="22.22222222222222" capacity="1500.0" permlanes="1.0" oneway="1" modes="car" origid="-52043" type="primary" />
<link id="8772" from="-52036" to="-52025" length="6.090397116230199E-4" freespeed="22.22222222222222" capacity="1500.0" permlanes="1.0" oneway="1" modes="car" origid="-52043" type="primary" />
lengths originally are in meters and were ranging from 170-800 meters...
simulation still runs but results were wrong simply because distances of trips that I want to report are awkwardly very small..I used espg 4326 for WGS 84 in network editor...
Do you have any suggestion or ideas on what have caused this error?
Thanks a lot
by Marcel Rieser on 2017-08-30 19:40:01
Don't use WGS84 as the target coordinate system in the Network Editor. MATSim performs distance calculations in several places during the simulation, and expects the coordinates to be in an Euclidean coordinate system. Most commonly used projections used for by the local mapping authorities provide a grid based on meter as units.
lengths originally are in meters and were ranging from 170-800 meters...
OSM does not contain link lengths as an attribute. This is why NetworkEditor (or to be more precise: the OsmNetworkReader
) calculates the links' length based on the coordinates of the from- and to-nodes — and there assumes them to be in a meter-based, euclidean coordinate system.
In your case, as you're using WGS84 as target coordinate system when converting the data from OSM, the calculation goes wrong and the much too short length values are the result thereof.
To fix the problem with the links' length, please choose another coordinate system, suitable for your region.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq