comma instead of dots in lat/long after serverchange

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) {

Comments

  • acrylian Administrator, Developer
    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?
  • 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
  • acrylian Administrator, Developer
    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.
  • > 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
  • acrylian Administrator, Developer
    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.
  • 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 (!!?) <<<<
    but on my home environment with dots
    (seen with phpMyAdmin)

    btw:
    once I used in project for coordinates not varchar() but
    dd_long double(15,13)
    or
    utm_east double(10,3) ...

    so problem might be the insert routine, or the database-config ...

    Eli
  • acrylian Administrator, Developer
    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.
Sign In or Register to comment.