[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Routes from counting data
|
Hi Fereshte,
this is a separate python module you have to install. You can make use of our $SUMO_HOME/tools/requirements.txt file together with pip utility to get the right version (and other modules needed in python tools shipped with SUMO). Usage / installation is explained here on the official Python web site.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-10-19T16:50:15+0200
Von: "fereshte jafari" <j.fereshte1993@xxxxxxxxx>
An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>
Dear Mikro,
I changed the projParameter. Now the error is like this:
Traceback (most recent call last):
File "C:\Program Files (x86)\Eclipse\2023.10\tools\detector\mapDetectors.py", line 109, in <module>
main()
File "C:\Program Files (x86)\Eclipse\2023.10\tools\detector\mapDetectors.py", line 87, in main
x, y = net.convertLonLat2XY(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 468, in convertLonLat2XY
x, y = self.getGeoProj()(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 449, in getGeoProj
import pyproj
ModuleNotFoundError: No module named 'pyproj'
regards,
Fereshteh
Dear Fereshte,
Sorry for the bit short-sighted answer last time. A projParameter value of "!" actually means there is no projection defined. In order to map detectors with a geographic coordinate one has to know the target projection, too. Our MATSim importer doesn't read their projection info yet.
What happens if you change the projParameter to "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb +units=m +no_defs +type=crs" (which corresponds to the EPSG:27700 value from your MATSim file)?
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-10-17T16:19:10+0200
Von: "fereshte jafari" <j.fereshte1993@xxxxxxxxx>
An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>, "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>
Dear Mirko,
Now my network file contains a location tag and a projParameter attribute, exactly like what you shared with me. But still the script loacted at SUMO_HOME/tools/detector/mapDetectors.py for reading the "latitude" and "longitude" of detectors and locating the detectors on the network does not work and I faced the below error message:
Traceback (most recent call last):
File "C:\Program Files (x86)\Eclipse\2023.10\tools\detector\mapDetectors.py", line 109, in <module>
main()
File "C:\Program Files (x86)\Eclipse\2023.10\tools\detector\mapDetectors.py", line 87, in main
x, y = net.convertLonLat2XY(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 468, in convertLonLat2XY
x, y = self.getGeoProj()(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 447, in getGeoProj
raise RuntimeError("Network does not provide geo-projection")
RuntimeError: Network does not provide geo-projection
Any ideas?
Regards,
Fereshteh
Dear Fereshte,
the file is very large and as such not easy to share. Probably it is enough to place the right location tag in it. Mine looks like this:
<location netOffset="-358612.77,-508349.09" convBoundary="0.00,0.00,123689.54,148017.81" origBoundary="358612.77,508349.09,482302.31,656366.81" projParameter="!"/>
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-09-20T18:32:36+0200
Von: "fereshte jafari" <j.fereshte1993@xxxxxxxxx>
An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>
Dear Mirko,
Thanks for your response.
I would be thankful if you could share the converted network including the location tag with projParameter attribute with me. Then I will see if the script located at SUMO_HOME/tools/detector/mapDetectors.py works with this network or not.
Regards,
Fereshteh
Dear Fereshte,
I get a location tag with projParameter attribute when converting to a SUMO network in v.1.18.0. Not sure what caused the problem on your side?
Best regards
Mirko
Dear Mirko,
I am using the latest version of sumo:
#define VERSION_STRING "v1_18_0+0000-03ecfdea036"
Please find enclosed the MATsim file. And the command that I used to convert the network is below:
netconvert --matsim Matsim.network.xml -o mySUMOnetwork.net.xml --xml-validation never
Thanks for your time and guidance.
Regards,
Fereshteh
Dear Feresteh,
did you use the latest SUMO version 1.18.0 or an older one? If you used an older one, could you please check if the projParameter attribute is still missing when converting the MATSim network to SUMO in v. 1.18.0? And if you already use the latest version, could you provide the MATsim file together with the netconvert command to let us check?
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-09-12T10:39:38+0200
Von: "fereshte jafari" <j.fereshte1993@xxxxxxxxx>
An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>
Dear Mirko,
Thanks for your reply.
Actually, my network was edited by Matsim first but then I converted it to a SUMO network using the "netconvert" command.
Yes, there is a "location" tag in my network file. Please see the image below. But it does not contain the "projParameter" attribute.
Regards,
Fereshteh
This looks like your network file does not contain a location tag (which is obligatory by nowadays standards and should be written when generated with netedit/netconvert).
- Is there a location tag?
- Does it contain a projParameter attribute?
- If not, how did you create the network? Did you edit it outside of netedit/netconvert?
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-09-04T12:11:24+0200
Von: "fereshte jafari via sumo-user" <sumo-user@xxxxxxxxxxx>
Thanks for your guidance.
I followed Jan's suggestion but faced the below error message. Any ideas?
Traceback (most recent call last):
File "C:\Program Files (x86)\Eclipse\Sumo\tools\detector\mapDetectors.py", line 110, in <module>
main()
File "C:\Program Files (x86)\Eclipse\Sumo\tools\detector\mapDetectors.py", line 88, in main
x, y = net.convertLonLat2XY(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 468, in convertLonLat2XY
x, y = self.getGeoProj()(lon, lat)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 446, in getGeoProj
if not self.hasGeoProj():
File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\net\__init__.py", line 442, in hasGeoProj
projString = self._location["projParameter"]
KeyError: 'projParameter'
Thanks in advance.
Regards,
Fereshteh
Please just follow the suggestion of Jan to use the script loacted at SUMO_HOME/tools/detector/mapDetectors.py . It uses the general process I have outlined before.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Routes from counting data
Datum: 2023-07-14T16:04:28+0200
Von: "fereshte jafari via sumo-user" <sumo-user@xxxxxxxxxxx>
An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>
Dear Mirko,
Thanks for your response.
My network is a very large network with a high number of detectors. Is it possible to obtain the lane and position of all detectors at once instead of one by one?
Regards,
Fereshteh
Hello!
I have a question regarding the detector file.
As it is mentioned in
https://sumo.dlr.de/docs/Demand/Routes_from_Observation_Points.html, SUMO requires the position of the detector on the lane to be expressed in meters. Specifically, the position should fall within the range of -1*lane's length to the lane's length. What I have in my database of detectors is the "latitude" and "longitude" of detectors. I wanted to know whether SUMO can read the "latitude" and "longitude" of detectors and locate the detectors on the network or not. If yes, could you please guide me on how to insert this information in the detector file?
Thanks in advance.
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho
--
Sincerely,
Fereshteh Jafari Shahdani
PhD candidate, Dep. of Civil Engineering
ISISE - University of Minho