Open Street Map Vector Data in TransDEM with JOSM

Guides, walkthroughs and hints
Message
Author
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#11 Post by erblanc0 »

In TransDEM, it is fine, the coordinates for where the route ends are just like in Google Earth:

Image

But after I export to GPX and import into JOSM, the same place has different coordinates:

Image

This is why it is skewed; now, why it has different coordinates, I can't tell..
geophil
Posts: 1516
Joined: 05 Jan 2011 16:45
Contact:

Re: Open Street Map Vector Data in TransDEM with JOSM

#12 Post 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:
Image

With an Open Topo Map tile:
Image

And the vector line exported as GPX, opened in JOSM and OSM data downloaded for it:
Image

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?
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#13 Post 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:

Image

I exported from TransDEM to GPX since that is what was mentioned in the tutorial:

Image

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.. ?
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#14 Post by erblanc0 »

geophil wrote:
And the vector line exported as GPX, opened in JOSM and OSM data downloaded for it:
Image

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.
geophil
Posts: 1516
Joined: 05 Jan 2011 16:45
Contact:

Re: Open Street Map Vector Data in TransDEM with JOSM

#15 Post 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.
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#16 Post 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.
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#17 Post 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.
geophil
Posts: 1516
Joined: 05 Jan 2011 16:45
Contact:

Re: Open Street Map Vector Data in TransDEM with JOSM

#18 Post 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.
erblanc0
Posts: 18
Joined: 31 May 2021 17:48

Re: Open Street Map Vector Data in TransDEM with JOSM

#19 Post by erblanc0 »

Here is the route in TransDEM.

Image

I exported it in JOSM and I overlayed OSM data and it looks OK again:

Image

I then exported it just like that for TransDEM, imported in in TransDEM and it is OK again:

Image

BUT if I set the filter for railway, copy and paste to a new layer and export that for TransDEm, it is EXTREMELY off:

Image

This is the issue basically.
geophil
Posts: 1516
Joined: 05 Jan 2011 16:45
Contact:

Re: Open Street Map Vector Data in TransDEM with JOSM

#20 Post 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.
Post Reply