Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading out heading out of {{Location}}-template #139

Open
fundriver opened this issue Apr 18, 2021 · 1 comment
Open

Reading out heading out of {{Location}}-template #139

fundriver opened this issue Apr 18, 2021 · 1 comment

Comments

@fundriver
Copy link

fundriver commented Apr 18, 2021

Hello,

well this is a feature request, already including a solution how to fix this in the code. At least basicly tested and working for my own purposes (so I can tag my pictures including heading in the newest branch).

I edited the FCoord.java (Line 347) as following to read out the heading out of a turned in Location-Template

    //{{Coord|52|14|5.15|N|21|7|51.91|E|region:PL}}
    else if (input.matches(".*[Kk]oordynaty|.*") || input.matches(".*[Cc]oord|.*") || input.matches(".*[Ll]ocation|.*")) {
        String[] s = input.split("\\|");
        if (s.length > 8) {    //długi
            String lat[] = { s[1], s[2], s[3] };
            String lon[] = { s[5], s[6], s[7] };
  		
  		if (s.length > 9 && s[9] != null && s[9].contains("heading:")){
  				String additions[] = input.split("_");
  				String heading = "";
  				
  			for (String addition : additions) {
  				if (addition.contains("heading:")) {
  					String additionsplit[] = addition.split(":");
  					heading = additionsplit[1];
  				}
  			}
  			coor = new Coord(lat, s[4], lon, s[8], heading);
  		}
  		else {
  			coor = new Coord(lat, s[4], lon, s[8]);
  		}
        }
    }

Well, however, but this is also the case with pre-tagged pictures as far i am aware off, the heading doesn't get saved into the session.xml and you will loose at this point in time. Maybe someone wants to think this further and also include it into the save-state.

@michal-josef-spacek
Copy link
Collaborator

michal-josef-spacek commented May 28, 2021

@fundriver Saving of heading to session file: #141
Tested on file with "GPS Img Direction" exif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants