Page 2 of 3
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 21 Jun 2022 23:15
by erblanc0
In TransDEM, it is fine, the coordinates for where the route ends are just like in Google Earth:
But after I export to GPX and import into JOSM, the same place has different coordinates:
This is why it is skewed; now, why it has different coordinates, I can't tell..
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 14:47
by geophil
Well, normally you export from JOSM to TransDEM, using the GPX format. But it should work the other way round as well.
I tried myself.
Your area:
With an Open Topo Map tile:
And the vector line exported as GPX, opened in JOSM and OSM data downloaded for it:
All is well aligned.
BTW, the native UTM zone for this location would be 35T, but I guess your route stretches far west, into 34T?
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 15:26
by erblanc0
Hi again,
Yes, the route is quite big, about 600 kms. I had to export 3 different batches and merge them in Trainz, which went ok.
Here is the whole route in TransDEM, it is correctly placed:
I exported from TransDEM to GPX since that is what was mentioned in the tutorial:
But again, the coordinates are not right when opened in JOSM. What did you do differently ? Or is the size of the route the issue.. ?
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 15:29
by erblanc0
geophil wrote:
And the vector line exported as GPX, opened in JOSM and OSM data downloaded for it:
All is well aligned.
I also noticed here that your coordinates are not ok either, look below; it should not be N 44 45 E 26.06, but N 44 26 and E 26.04. If you import this in TransDEM it will not fit correctly.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 17:54
by geophil
What you see in JOSM in the status bar is the current cursor position, not a coordinate of my GPX import.
You can clearly make out in my example that both in TransDEM and in JOSM my vector line and the OSM data are aligned.
There are also a couple of free GPX viewers, one them is
GPXSee. The standard background map is OSM. Load your GPX there and compare with the underlying map.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 18:28
by erblanc0
I know what you mean, but you don't understand.
I know it is the cursor position, but the difference in cursor position from top to bottom in your example is NOT from 44 40 to 44 20, those are kilometers of difference.
Also, the issue is not how it looks in JOSM, because it looks ok, the issue is that when importing back into TransDEM, it does not align, because coordinates are off.
I mean just import the route back in TransDEM and you will see for yourself.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 18:42
by erblanc0
I viewed the route in GPXSee and it is as it should be; in JOSM, it is not. I still think this is a JOSM issue.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 18:53
by geophil
Regarding geographic coordinates, there are different notations. TransDEM typically uses degrees, minutes and seconds, where seconds may have fractions. JOSM, by default, uses decimal degrees. So, 26° 15' is equal to 26.25°.
Be assured, JOSM does not have issues with coordinates and projections. I use it a lot for my professional work. You must be careful, though, when inspecting UTM coordinates in JOSM, because UTM is not the default setting for projected coordinates.
Again, I can't really identify what you mean. Without an underlying map reference in your screenshots, I am not able to tell what might be wrong. I need something like my map tile, or my JSON OSM download.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 20:20
by erblanc0
Here is the route in TransDEM.
I exported it in JOSM and I overlayed OSM data and it looks OK again:
I then exported it just like that for TransDEM, imported in in TransDEM and it is OK again:
BUT if I set the filter for railway, copy and paste to a new layer and export that for TransDEm, it is EXTREMELY off:
This is the issue basically.
Re: Open Street Map Vector Data in TransDEM with JOSM
Posted: 22 Jun 2022 21:19
by geophil
I see. I think I understand the problem now.
The "copy to new layer" in JOSM could be the reason. By default, that copy isn't automatically aligned and gets a new offset, defined by the current cursor position. But there is an option to enforce alignment. I will have to look it up tomorrow. On success, the filtered railway layer will be congruent with the base OSM layer.