This object is in archive! 

Make the clipboard proces a little easier by trimming the input

rvheddeg shared this idea 11 years ago
Completed

When I paste coordinates in the clipboard, I usually have a lot of processing to do. Adding degrees symbols, removing all kinds of symbols ans spaces.


I think it should make the clipboard a lot easier if Locus removed all the symbols ans spaces himself, before starting to interpret.


About adding the degrees, could you check for 2 dots, and replace the first one with a degree symbol? Would that makes sense?


Maybe adding some fallback scenario. If the results are not satisfactory, trying to add some regex to it (using the default display setting?).


Or, if Locus couldn`t come up with one possibility, it`s alright for me to show me a list of possibilities so I can choose the correct one.


Anyway, here are some examples


N50°54.123 E4°14.123 => OK


N50°54 .123 E4°14.123 => Wrong


N50°54. 123 E4°14.123 => Wrong


N50°54.1 23 E4°14.123 => Wrong


N50°54.123;E4°14.123 => Wrong? Frustrating, because that`s close to what you display


N50.54.123 E4.14.123 => Wrong


I`m using Locus for paperfree caching, but in the field it`s sometimes very frustrating to paste coordinates. A more tolerant input would be warmly welcomed.

Replies (8)

photo
0

Hmm I`m looking on this "issue"


It`s quite hard to define what is space that need to be there (space between coordinates) and what is space added by accident (all others)


the example with N50°54.123;E4°14.123 will works, but all others are really really wrong.


After some fight, this is result


1. `N50°54 .123 E4°14.123`: 50.90205, 4.235383333333333 => OK


2. `N50°54. 123 E4°14.123`: 50.90205, 4.235383333333333 => OK


3. `N50°54.1 23 E4°14.123`: 0.0, 0.0 => wrong


4. `N50°54.123;E4°14.123`: 50.90205, 4.235383333333333 => OK


5. `N50.54.123 E4.14.123`: 50.54, 123.0 => wrong


6. `N50 54.123 E4 14.123`: 50.90205, 4.235383333333333 => OK


7. `N50°54.123 E4°14.123`: 50.90205, 4.235383333333333 => OK


so spaces before and after dot works, `.` instead of `°` in 5. cannot work, because it ̈s not clear where start and end number. But I now allow step 6. so case if you miss this symbol. So 3 as well as 5 are quite complicated, rest should work better now

photo
0

Thanks Menion!


But as I want always more ;-), could you show the parsing immediately in the same screen after each edit? Then I can see if the parser is going to accept the right coordinates and adjust if necessary.

photo
0

Menion,


I`m using the latest version of Locus Pro (2.10.2) and pasting coordinates in the clipboard goes awfully wrong.


When I past the coordinates from above, I get the following


1. N50°54.123 E4°14.123 => N00°00.000`;E 123°00.000`


Could you also show the result immediately in the same screen after each edit? That would help save some time in some tight situations ;-)

photo
0

ah sorry. I have still small mess in this parsing. There is too much possibilities and I added support for one more and this caused this. Next time, I`ll test it much more before I publish some changes


To say sorry, I just added "Overview" for better usage as you suggested ;)


photo
0

Thanks, but could you use the same format in the overview? I think it will be much more easier to check...

photo
0

I`m not sure, is it really an overview? Wouldn`t result or preview match better?

photo
0

ah probably yes. I took first work it comes on my mind ... "Result" will be better, thanks!


rvheddeg .. format you may see is format, that you have defined in Locus settings. Because input support much more formats then output for display, it`s not simply possible to do this.

photo
0

I`m testing 2.10.2.8 and it`s better now, but I have still this small issue:


When I past the coordinates from above, I get the following


1. `N50°54.123 E4°14.123`: `N 50°54.123, E 04°14.123` => OK


8. `N50°54.123, E4°14.123`: N00°00.000`, E123°00.000` => Wrong


So if you copy&paste the result back in the editor, the result is wrong instead of the same...


I guess it`s a problem with point and comma.


But thanks to the "Result" panel, you can correct this quickly. Good job!

Replies have been locked on this page!