I did a lot of searching. Seem to get lucky on sites where users are quoting this stuff for other programming languages.
MapView - Layer with street and town names
Re: MapView - Layer with street and town names
Here it is. I attached the jpg image which caused the errror. I suppose someone has lost his armchair.I would be interested in finding the error and sorting it. Can you let me know what Distro you are running, what you did to create the error, what and where it is.
- Attachments
-
- L1008442-1.jpg (1.57 MiB) Viewed 7334 times
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: MapView - Layer with street and town names
Thanks for the reply and the picture, but I could not recreate the error. Expensive camera!!
Re: MapView - Layer with street and town names
I think it's not actually a bug rather than a national interpretation of numbers. When the 'error' occurs I've got the following numbers
fLat = Val(sLatArray[0]) + (Val(sLatArray[1]) / 60) + (Val(sLatArray[2]) / 3600)
sLatArray[2] = 37.58Val(sLatArray[2]) = NULL
So why NULL? In Germany Val("37,58") is equal to 37,58 (which is correct)
I might switch to English but I don't find the settings in the IDE.
Once in a lifetime. I presume I am the one of five people in the world using this camera, post process with open source with Linux
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: MapView - Layer with street and town names
I didn't think of that. Can you try adding the 'New' code below, and let me know if that works for you in your German setup. If it does it should work for other languages as well.So why NULL? In Germany Val("37,58") is equal to 37,58 (which is correct)
sLatArray = Split(sLat, " ")
sLongArray = Split(sLong, " ")
If IsNull(Val("2.2")) Then ''New
sLatArray = Replace(sLatArray, ".", ",") ''New
sLongArray = Replace(sLongArray, ".", ",") ''New
Endif
fLat = Val(sLatArray[0]) + (Val(sLatArray[1]) / 60) + (Val(sLatArray[2]) / 3600)
fLong = Val(sLongArray[0]) + (Val(sLongArray[1]) / 60) + (Val(sLongArray[2]) / 3600)
Good for you. Puts my Canon 6D MkII in its place! I also use Linux for all my photography.Once in a lifetime. I presume I am the one of five people in the world using this camera, post process with open source with Linux
Re: MapView - Layer with street and town names
Weird, the condition IsNull(Val("2.2")) is never true
When I type Val("2.2") into the console the result is "02.02.2021 00:00:00"
Then I replaced your condition with the code
The following code works but I suppose it is not very elegant:
When I type Val("2.2") into the console the result is "02.02.2021 00:00:00"
Then I replaced your condition with the code
InStr(sLatArray[2], ".")
This condition becomes true but sLatArray = Replace(sLatArray, ".", ",")
expects a string: an error occurs. I guess you need to go through the array in a loop and then replace the values one by one.The following code works but I suppose it is not very elegant:
If InStr(sLatArray[2], ".") Then ''New
sLatArray[0] = Replace(sLatArray[0], ".", ",") ''New
sLatArray[1] = Replace(sLatArray[1], ".", ",") ''New
sLatArray[2] = Replace(sLatArray[2], ".", ",") ''New
sLongArray[0] = Replace(sLongArray[0], ".", ",") ''New
sLongArray[1] = Replace(sLongArray[1], ".", ",") ''New
sLongArray[2] = Replace(sLongArray[2], ".", ",") ''New
Endif
All in all this is actually the application I was looking for. I just need to enhance it to raw files.Re: MapView - Layer with street and town names
Continued some tests. My code is not reliable, sorry. It doesn't work for all jpg's. I don't know, why.
I did notice you are using exiftool to extract the exif tags. I use the following parameter to get the correct "GPS Position"-tag in degrees (e.g. 54.989667). No calculation is necessary:
aCommand = ["exiftool", "-c", "%+6f", "-x", "Arp", FileChooser1.SelectedPath, "|", "sort"]
Exec aCommand To myGPS
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: MapView - Layer with street and town names
I have set up my laptop with German as the main language and have tried various code changes to stop this problem, but there is always a knock on effect. I think I will leave it as it is for now.
Re: MapView - Layer with street and town names
No worries. Don't get lost in German language on your computer.
I am currently working on my own Exif2Map app;) Just for fun. Sure, eveybody needs his own app! In the meantime I figured out which long way round it needs to preview raw file in the imageview class (e.g. *DNG). But what I haven't manage so far is to preview raw files in FileView class although Nautilus and Dolphin are able to show the embedded jpg immediately.
I copied one or another idea from your project PhotoEXIF. In particular I embraced the AutoResize and Expand functionality which I was (and still am) not familiar with. I'll provide an early beta version in Project Showcase subforum in the next few days.
I am currently working on my own Exif2Map app;) Just for fun. Sure, eveybody needs his own app! In the meantime I figured out which long way round it needs to preview raw file in the imageview class (e.g. *DNG). But what I haven't manage so far is to preview raw files in FileView class although Nautilus and Dolphin are able to show the embedded jpg immediately.
I copied one or another idea from your project PhotoEXIF. In particular I embraced the AutoResize and Expand functionality which I was (and still am) not familiar with. I'll provide an early beta version in Project Showcase subforum in the next few days.