Skip to content
Browse all functions

Convert Geocode

geo/convertgeocode

convertgeocode (Convert Geocode) is a 1001fx API function in the group Geo: POST https://api.1001fx.com/geo/convertgeocode, 1 credit per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

1 credit per callHTTP APIn8nMake

Converts a geocode between decimal, DMS (degrees, minutes, seconds) and Exif format. Pass one of the three, get all formats back.

Try it in the 1001fx app

Run convertgeocode in your browser with your API key – fill the form, click Run and get the answer or the file.

convertgeocode in the 1001fx app: the form with example values
Convert Geocode in the 1001fx app

Endpoint

POSThttps://api.1001fx.com/geo/convertgeocode
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • decimalobjectoptional

    Your geocode in decimal format. Either decimal, dms or exif needs to be provided.

    • latitudenumberoptional

      Latitude value to look up.

      Min:
      -90
      Max:
      90
      Example:
      50.11046833333334
    • longitudenumberoptional

      Longitude value to look up.

      Min:
      -180
      Max:
      180
      Example:
      8.68165861111111
    • fullstringoptional

      String of combined values seperated by comma

      Example:
      50.11046833333334,8.68165861111111
  • dmsobjectoptional

    Your geocode in DMS format. Either decimal, dms or exif needs to be provided.

    • verticalobjectoptional

      Vertical values for your coordinate.

      • degnumberrequired

        Degrees value of your coordinate

      • minnumberrequired

        Minute value of your coordinate

      • secnumberrequired

        Seconds value of your coordinate

      • directionenumrequired

        Vertical direction of your coordinate

        Values:
        N
        S
        Example:
        N
    • horizontalobjectoptional

      Horizontal values for your coordinate.

      • degnumberrequired

        Degrees value of your coordinate

      • minnumberrequired

        Minute value of your coordinate

      • secnumberrequired

        Seconds value of your coordinate

      • directionenumrequired

        Horizontal direction of your coordinate

        Values:
        E
        W
        Example:
        E
    • fullstringoptional

      String of combined values

  • exifobjectoptional

    Your geocode in Exif format. Either decimal, dms or exif needs to be provided.

    • androidobjectoptional

      Exif data

      • latitudeRefenumrequired

        Latitude Ref

        Values:
        N
        S
        Example:
        N
      • latitudestringrequired

        Latitude value

        Example:
        50/1,6/1,3768.6000000012996/100
      • longitudeRefenumrequired

        Latitude Ref

        Values:
        E
        W
        Example:
        E
      • longitudestringrequired

        Longitude value

        Example:
        8/1,40/1,5397.099999999853/100
    • iosobjectoptional

      Exif data

      • latitudeRefenumrequired

        Latitude Ref

        Values:
        N
        S
        Example:
        N
      • latitudearray<array>required

        Latitude values

      • longitudeRefenumrequired

        Latitude Ref

        Values:
        E
        W
        Example:
        E
      • longitudearray<array>required

        Longitude values

Examples

From a decimal string

decimal.full as "latitude,longitude".

Input

Expects a json body
{
  "decimal": {
    "full": "50.11046833333334,8.68165861111111"
  }
}

Output · HTTP 200

Response
{
  "result": {
    "decimal": {
      "latitude": 50.11046833333334,
      "longitude": 8.68165861111111,
      "full": "50.11046833333334,8.68165861111111"
    },
    "dms": {
      "vertical": {
        "deg": 50,
        "min": 6,
        "sec": 37.686000000012996,
        "direction": "N"
      },
      "horizontal": {
        "deg": 8,
        "min": 40,
        "sec": 53.970999999998526,
        "direction": "E"
      },
      "full": "50°6'37.686000000012996\"N 8°40'53.970999999998526\"E"
    },
    "exif": {
      "ios": {
        "GPSLatitudeRef": "N",
        "GPSLatitude": [
          [
            50,
            1
          ],
          [
            6,
            1
          ],
          [
            3768.6000000012996,
            100
          ]
        ],
        "GPSLongitudeRef": "E",
        "GPSLongitude": [
          [
            8,
            1
          ],
          [
            40,
            1
          ],
          [
            5397.099999999853,
            100
          ]
        ]
      },
      "android": {
        "GPSLatitudeRef": "N",
        "GPSLongitudeRef": "E",
        "GPSLatitude": "50/1,6/1,3768.6000000012996/100",
        "GPSLongitude": "8/1,40/1,5397.099999999853/100"
… (4 more lines)
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"decimal":{"full":"50.11046833333334,8.68165861111111"}}'

From decimal values

decimal.latitude and decimal.longitude.

Input

Expects a json body
{
  "decimal": {
    "latitude": 50.11046833333334,
    "longitude": 8.68165861111111
  }
}

Output · HTTP 200

Response
{
  "result": {
    "decimal": {
      "latitude": 50.11046833333334,
      "longitude": 8.68165861111111,
      "full": "50.11046833333334,8.68165861111111"
    },
    "dms": {
      "vertical": {
        "deg": 50,
        "min": 6,
        "sec": 37.686000000012996,
        "direction": "N"
      },
      "horizontal": {
        "deg": 8,
        "min": 40,
        "sec": 53.970999999998526,
        "direction": "E"
      },
      "full": "50°6'37.686000000012996\"N 8°40'53.970999999998526\"E"
    },
    "exif": {
      "ios": {
        "GPSLatitudeRef": "N",
        "GPSLatitude": [
          [
            50,
            1
          ],
          [
            6,
            1
          ],
          [
            3768.6000000012996,
            100
          ]
        ],
        "GPSLongitudeRef": "E",
        "GPSLongitude": [
          [
            8,
            1
          ],
          [
            40,
            1
          ],
          [
            5397.099999999853,
            100
          ]
        ]
      },
      "android": {
        "GPSLatitudeRef": "N",
        "GPSLongitudeRef": "E",
        "GPSLatitude": "50/1,6/1,3768.6000000012996/100",
        "GPSLongitude": "8/1,40/1,5397.099999999853/100"
… (4 more lines)
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"decimal":{"latitude":50.11046833333334,"longitude":8.68165861111111}}'

From a DMS string

dms.full in degrees, minutes, seconds.

Input

Expects a json body
{
  "dms": {
    "full": "50°6'37.686000000012996\"N 8°40'53.970999999998526\"E"
  }
}

Output · HTTP 200

Response
{
  "result": {
    "decimal": {
      "latitude": 50.11046833333334,
      "longitude": 8.68165861111111,
      "full": "50.11046833333334,8.68165861111111"
    },
    "dms": {
      "vertical": {
        "deg": 50,
        "min": 6,
        "sec": 37.686000000012996,
        "direction": "N"
      },
      "horizontal": {
        "deg": 8,
        "min": 40,
        "sec": 53.970999999998526,
        "direction": "E"
      },
      "full": "50°6'37.686000000012996\"N 8°40'53.970999999998526\"E"
    },
    "exif": {
      "ios": {
        "GPSLatitudeRef": "N",
        "GPSLatitude": [
          [
            50,
            1
          ],
          [
            6,
            1
          ],
          [
            3768.6000000012996,
            100
          ]
        ],
        "GPSLongitudeRef": "E",
        "GPSLongitude": [
          [
            8,
            1
          ],
          [
            40,
            1
          ],
          [
            5397.099999999853,
            100
          ]
        ]
      },
      "android": {
        "GPSLatitudeRef": "N",
        "GPSLongitudeRef": "E",
        "GPSLatitude": "50/1,6/1,3768.6000000012996/100",
        "GPSLongitude": "8/1,40/1,5397.099999999853/100"
… (4 more lines)
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"dms":{"full":"50°6'\''37.686000000012996\"N 8°40'\''53.970999999998526\"E"}}'

From DMS values

dms.vertical and dms.horizontal as separate values.

Input

Expects a json body
{
  "dms": {
    "vertical": {
      "deg": 50,
      "min": 6,
      "sec": 37.686000000012996,
      "direction": "N"
    },
    "horizontal": {
      "deg": 8,
      "min": 40,
      "sec": 53.970999999998526,
      "direction": "E"
    }
  }
}

Output · HTTP 200

Response
{
  "result": {
    "decimal": {
      "latitude": 50.11046833333334,
      "longitude": 8.68165861111111,
      "full": "50.11046833333334,8.68165861111111"
    },
    "dms": {
      "vertical": {
        "deg": 50,
        "min": 6,
        "sec": 37.686000000012996,
        "direction": "N"
      },
      "horizontal": {
        "deg": 8,
        "min": 40,
        "sec": 53.970999999998526,
        "direction": "E"
      },
      "full": "50°6'37.686000000012996\"N 8°40'53.970999999998526\"E"
    },
    "exif": {
      "ios": {
        "GPSLatitudeRef": "N",
        "GPSLatitude": [
          [
            50,
            1
          ],
          [
            6,
            1
          ],
          [
            3768.6000000012996,
            100
          ]
        ],
        "GPSLongitudeRef": "E",
        "GPSLongitude": [
          [
            8,
            1
          ],
          [
            40,
            1
          ],
          [
            5397.099999999853,
            100
          ]
        ]
      },
      "android": {
        "GPSLatitudeRef": "N",
        "GPSLongitudeRef": "E",
        "GPSLatitude": "50/1,6/1,3768.6000000012996/100",
        "GPSLongitude": "8/1,40/1,5397.099999999853/100"
… (4 more lines)
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"dms":{"vertical":{"deg":50,"min":6,"sec":37.686000000012996,"direction":"N"},"horizontal":{"deg":8,"min":40,"sec":53.970999999998526,"direction":"E"}}}'

From iOS EXIF data

GPS values as an iPhone writes them into EXIF.

Input

Expects a json body
{
  "exif": {
    "ios": {
      "latitudeRef": "N",
      "latitude": [
        [
          50,
          1
        ],
        [
          6,
          1
        ],
        [
          3768.6000000012996,
          100
        ]
      ],
      "longitudeRef": "E",
      "longitude": [
        [
          8,
          1
        ],
        [
          40,
          1
        ],
        [
          5397.099999999853,
          100
        ]
      ]
    }
  }
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"exif":{"ios":{"latitudeRef":"N","latitude":[[50,1],[6,1],[3768.6000000012996,100]],"longitudeRef":"E","longitude":[[8,1],[40,1],[5397.099999999853,100]]}}}'

From Android EXIF data

GPS values as Android writes them into EXIF.

Input

Expects a json body
{
  "exif": {
    "android": {
      "latitudeRef": "N",
      "latitude": "50/1,6/1,3768.6000000012996/100",
      "longitudeRef": "E",
      "longitude": "8/1,40/1,5397.099999999853/100"
    }
  }
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/geo/convertgeocode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"exif":{"android":{"latitudeRef":"N","latitude":"50/1,6/1,3768.6000000012996/100","longitudeRef":"E","longitude":"8/1,40/1,5397.099999999853/100"}}}'

Try convertgeocode now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.019.04.2023created
Ask 1001fx