Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Inquiry : Conversion from co-ordinate axis to Latitude and Longitude

Thanks a lot! I found the solution.

The problem was with the sumo version.

An old sumo version was not correctly converting co-ordinates.

Sumo 1.1 is transforming between co-ord to lat long clearly


From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Sent: 04 May 2019 17:30
To: Sumo project User discussions
Subject: Re: [sumo-user] Inquiry : Conversion from co-ordinate axis to Latitude and Longitude
 
By using this <location> value,
traci.simulation.convertGeo(x=50450.7527098387, y=22602.868908196364)
returns
(77.56111960623011, 13.008159137553312)
However, the value
777805.9327098387, 1439436.2689081964
is the raw UTM-value corresponding to that location (the x,y value without the netOffset)
Such a value would be returned by
sumolib.net.convertLonLat2XY(77.56111960623011, 13.008159137553312, rawUTM=True))

I'm pretty sure there must be some other code in your script, responsible for that output because traci alone does not return nor accept raw UTM values.

Am Sa., 4. Mai 2019 um 12:00 Uhr schrieb Sheshadri Kalkunte Ramachandra <sheshadrik@xxxxxxxxxx>:
Sorry for the late response.

Here is the location that we have set.

<location netOffset="-727355.18,-1416833.40" convBoundary="0.00,0.00,90258.93,58234.44" origBoundary="77.098996,12.802468,77.927674,13.334317" projParameter="+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"/>

From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Sent: 03 May 2019 23:46
To: Sumo project User discussions
Subject: Re: [sumo-user] Inquiry : Conversion from co-ordinate axis to Latitude and Longitude
 
What is the <location> attribute of the network that was loaded when the calls below were made?

Am Fr., 3. Mai 2019 um 19:00 Uhr schrieb Sheshadri Kalkunte Ramachandra <sheshadrik@xxxxxxxxxx>:
Code:

position = traci.vehicle.getPosition(self.vehicleId)
pos_x = position[0] # cartesian X
pos_y = position[1] # cartesian Y
geo_co_ord = traci.simulation.convertGeo(pos_x, pos_y, fromGeo=False)

The geo co-ordinates which i receive are incorrect. I have checked by putting them in google maps.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Outputs:

The cartesian co-ordinate  (50450.7527098387, 22602.868908196364)  => returned by getPosition(vehicleId)
The geo co-ordinate  (777805.9327098387, 1439436.2689081964) => returned by convertGeo(pos_x, pos_y)


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top