ZenphotoCMS Forum
comma instead of dots in lat/long after serverchange - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: comma instead of dots in lat/long after serverchange (/thread-12311.html)



comma instead of dots in lat/long after serverchange - Eli15 - 2015-09-15

hi,

so with comma, the lat/long doesn't work.
I had to change or insert on line about 408**

...
$lat_f = str_replace(',', '.', $lat_f);
$long_f = str_replace(',', '.', $long_f);

    $result = array( ...

the str_replace above seems not to work ...

best,
Eli

** file: zp_openstreetmap.php
function getImageGeodata($image) {




comma instead of dots in lat/long after serverchange - acrylian - 2015-09-15

Yes, GEO data values for long/latmust use international format with dots. To my knowledge that is the standard on these values Comma is a specific European writing only.

Where does your geodata come from that it uses commas?




comma instead of dots in lat/long after serverchange - Eli15 - 2015-09-15

I add them with exiftool and don't remember if with dot or not and if there is any errorroutine.
In exiftool I see in the metadata with '-g -s -k' in a different, 'own' degreenotation.
Eli




comma instead of dots in lat/long after serverchange - acrylian - 2015-09-15

I did search a bit and I didn't really find if commas are "disallowed" in general. At least dots seem to be the general writing (and I am from country that writes commas with decimals as well). I can of course add your addition to the plugin just to cover it.




comma instead of dots in lat/long after serverchange - Eli15 - 2015-09-15

I can of course add your addition to the plugin just to cover it.
yes, sure!

You have this code some lines above in this function. I didn't analyse it fully, if its double now ...

I switched from my home-Apache/2.4.4 (Win32) to a "Server API Apache 2.0 Handler" (Linux) of my hoster ALL-INKL.COM.
may be any character set hook or interchange

Eli




comma instead of dots in lat/long after serverchange - acrylian - 2015-09-16

I doubt that server setting changes geometa data in the images as those are statically. You had them most likely added "wrong" with commas in the first place.




comma instead of dots in lat/long after serverchange - Eli15 - 2015-09-18

hi,

no, I have them not added "wrong", I'm just the simple BDU.
I insert the values with exiftool:
exiftool -xmp:gpslatitude=54.55555 -xmp:gpslongitude=9.88888 -exif:gpslatitude=54.55555 -exif:gpslongitude=9.88888 image.jpg

error approximation:

in the ZenPhoto-table, they become saved
from my hoster with commata (!!?)




comma instead of dots in lat/long after serverchange - acrylian - 2015-09-19

I doubt that Zenphoto converts anything. The plugin re-uses parts of the GoogleMap plugin existing for years and I don't remember to ever have heard about this issue.

Anyway the osm plugin now converts commas in these values to dots if existing.