Demonstrate the sanitizeGeo() function


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.



The result will be the sanitized floating point decimal or the returned error.