matsim-org/matsim-code-examples

about the coordinate of network and xy.txt

Closed this issue · 3 comments

Hi, I am a beginner in matsim, is the coordinate system of the network in matsim wg84? Why is it not normal latitude and longitude coordinates after I convert OSM to network?
image
If I want to import a normal latitude and longitude xy file, how do I display it on the network?
image
image
please and thank you

There is a setting in MATSim where you can define the CRS of your network

	<module name="network" >
		<!-- The Coordinates Reference System in which the coordinates are expressed in the input file. At import, the coordinates will be converted to the coordinate system defined in "global", and willbe converted back at export. If not specified, no conversion happens. -->
		<param name="inputCRS" value="null" />
		<param name="inputChangeEventsFile" value="null" />
		<param name="inputNetworkFile" value="newNetwork.xml" />
		<param name="laneDefinitionsFile" value="null" />
		<param name="timeVariantNetwork" value="false" />
	</module>

In the parameter inputCRS

MATSim 中有一个设置,您可以在其中定义网络的 CRS

	<module name="network" >
		<!-- The Coordinates Reference System in which the coordinates are expressed in the input file. At import, the coordinates will be converted to the coordinate system defined in "global", and willbe converted back at export. If not specified, no conversion happens. -->
		<param name="inputCRS" value="null" />
		<param name="inputChangeEventsFile" value="null" />
		<param name="inputNetworkFile" value="newNetwork.xml" />
		<param name="laneDefinitionsFile" value="null" />
		<param name="timeVariantNetwork" value="false" />
	</module>

在参数输入CRS中
thanks for your reply!

Please note, that MATSim only works with eucledean CRS, because it calculates distances using eucledean math. WSG84 is a spheric coordinate system and cannot be used in MATSim.

You must transform your coordinates into a eucledean CRS. The UTM coordinate system works well for many applications.