NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

2
1

Hi !

There is a form to modify a map created in OSM to avoid the splitting of a route that crosses the International Dateline...? The resulting map looks ugly.

Thanks in advance

alt text

asked 11 Feb '20, 09:46

StratoCat's gravatar image

StratoCat
56337
accept rate: 0%

Hi, what tool are you using to create this map ?

(11 Feb '20, 15:26) H_mlet

I'm importing location coordinates (Lat, Long) in uMap (https://umap.openstreetmap.fr/en/)

(11 Feb '20, 15:53) StratoCat

After a number of tries, I finally found it ! You have to subtract 360 to all positive longitudes (the reverse might also work).

Here is your updated file

I used some vim magic to do it, first conversion from tsv to csv, then calculation :

:%s/\t/,/
:%s/,\(1[^"]\+\)/\=','.string(eval(submatch(1))-360)/

You probably can do it with any spreadsheet software, but I'm glad I've learned to do it with vim. ;-)

Side note, gpsbabel is great for converting positions, especially to gpx as track, but was not needed after all. I just exported my already shown try, and looked at the data. When I found a longitude of -247 I guessed this would work.

permanent link

answered 11 Feb '20, 18:04

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

1

It also works by adding 360 to negative longitudes, and this is the command :

 :%s/,\(-[^\n]\+\)/\=','.string(eval(submatch(1))+360)/
(11 Feb '20, 18:07) H_mlet

Absolutelly Awesome. You saved my day ... really.

A BIG thank you!

(11 Feb '20, 19:51) StratoCat

You're welcome. :-) It should be documented somewhere...

(11 Feb '20, 22:02) H_mlet

Did you try to manually center your map on the pacific ?

I've created a polyline across this ocean, and it looks alright, see below.

You might share your map URL, or the original data, for further experimentation.

Regards

umap across pacific

permanent link

answered 11 Feb '20, 16:06

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

edited 11 Feb '20, 16:07

Sure... the URL is https://umap.openstreetmap.fr/en/map/project-loon-hbal011_418121

The data are lat,lon locations

(11 Feb '20, 16:12) StratoCat

Lat Lon 41.090046 -117.24723 41.246807 -116.93441 41.386356 -116.76473 41.585396 -116.60854 41.72139 -116.30826

(11 Feb '20, 16:14) StratoCat

It looks like an old unsolved problem : https://github.com/umap-project/umap/issues/33.

It's sad if it works only with a manual polyline. You might try to convert your csv to a GPX "track", and import, to force it to display as a line.

Or try to draw a line across the pacific, before the import ?

Please send a CSV file if you want me to try these things.

Regards.

permanent link

answered 11 Feb '20, 16:29

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

Any help on this will be very welcome.

How I can convert it to GPX?

The CSV file can be found here https://stratocat.com.ar/hbal011.csv

(11 Feb '20, 16:40) StratoCat

It looks so nice now...

alt text

permanent link

answered 11 Feb '20, 19:57

StratoCat's gravatar image

StratoCat
56337
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×2
×2

question asked: 11 Feb '20, 09:46

question was seen: 2,220 times

last updated: 11 Feb '20, 22:02

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum