Sanitize

Sanitize geodesic values

Description

This application demonstrates the KMLWB::sanitizeGeo() function. This function is used throughout KML Workbench to normalize geographic data for security and consistency. Specifically, the function is applied to all latitudes, longitudes and bearings. The function performs the following:

  • Trim whitespace.
  • Strip slashes.
  • Encode html special characters.
  • Remove degree (°) sign.
  • Trim leading zeros: "-005.5" --> "-5.5".
  • Lead decimal with zero: ".6" --> "0.6".
  • Correct negative zero: "-0" --> "0".
  • Accept all floating point decimals.

Instructions

  1. Input a value into the field below.
  2. Click the [Sanitize] button.
  3. The result will be the sanitized floating point decimal or the returned error.

Inputs

Notes