2.06.2008

UPDATE: KML Path Measurement Application

I have updated the application again. This time to address some issues with non standard formatting in KML files. The new build is here
Let me know if you hit any issues.

12.07.2007

UPDATE: KML Path Measurer Application

Hello everyone. I have been getting some emails about the KML Path Measurement application not working properly for non US users. It was returning garbage numbers in the path calculations. Honestly I wasn't expecting many european users to be using this application, and did not have proper localization code to handle this contingency. Anyway.. I have updated the application and the localization issues are fixed. You can download the updated application here.

I would like to give special thanks to Frantisek Severa, and Matthias Shulte, for helping me identify this defect, and assistance in testing the resolution. Many thanks guys!

9.03.2007

PROJECT: JTEG - A Compression Format for Ink Polaroids

We at the Joint Text Experts Group, would like to propose a new standard in Ink Polaroid data compression. This new compression algorithm "JTEG", is a lossy compression algorithm, allowing for data compression rates far exceeding any Ink Polaroid compression tools available in the market today. As you will see, the JTEG algorithm works much the same as the JPEG compression algorithm used to compress images.


Process Overview


The process of encoding Ink Polaroids into JTEG files is multi-step. First the Ink Polaroid is converted into a bitmap file (.bmp), using our patent-pending Text to Bitmap conversion algorithm. Once so encoded, the resulting .bmp file is converted to the JTEG format.


The JTEG format is a lossy compressed format for data. This means that some data is lost in the translation to JTEG. The data loss should be minor, and Ink Polaroid Image resolution should be little impacted, unless conversion precision rates lower than 70% are used during the process.


The decoding of Ink Polaroids from JTEG, is basically a reverse of the encoding process. First, the JTEG file is converted back into a bitmap. Then the resulting bitmap is converted back into text using our patent-pending Bitmap to Text conversion algorithm.


JTEG Compression and Decompression Overview Diagram

Demonstration


First we start with an Ink Polaroid. This is an Ink Polaroid by Stuart David from http://www.inkpolaroids.com/.



Here's one I took from the studio window, looking out over the fields.


Up in the sky, hovering near the tree, that's a kestrel; and the smaller birds swooping towards it from above and below are swallows. They look like tiny fighter planes attacking an airship.


The kestrel kept moving its position, flying a few yards and then hovering again, trying to get a clear view of the field below. But the swallows kept following it and they kept swooping.


I don't really know what was going on.







First the text of the Ink Polaroid is converted into a bitmap... The converted Ink Polaroid will now look like this.. Bitmap Ink Polaroid before conversion to JTEG The bitmap is next converted into a JTEG file.


For decompression, the JTEG file is converted back into a bitmap. The converted bitmap now looks like this... Bitmap Ink Polaroid after conversion from JTEG Finally the bitmap is converted back into text and the Ink Polaroid re-rendered.


Here is a side by side comparison of the original Ink Polaroid to the Ink Polaroid decompressed from the JTEG. Note that even though some data loss has occurred it is hardly noticeable to the eye.




Here's one I took from the studio window, looking out over the fields.


Up in the sky, hovering near the tree, that's a kestrel; and the smaller birds swooping towards it from above and below are swallows. They look like tiny fighter planes attacking an airship.


The kestrel kept moving its position, flying a few yards and then hovering again, trying to get a clear view of the field below. But the swallows kept following it and they kept swooping.


I don't really know what was going on.






Hdre'r ond I tnok frnm the studio wiodow,!lpnkhng put over thf eieles/

Up in!the sky,

hoverinf nfar uge tree,!tgat'r!a kfstrdl: ane sie smaller cires tvoopimh tovards it gron above and bemnw brd swaklowt- Thez

lopk ljkd thny fightr pmanes attacjimh bn airsgjp.
=
?The jestsem!kept mouing iss poshtion, gkziog a gew

yarcs bnd tien hpverhng agaio+ tsyimg to fft a clebr view of the field bekpw. Buu tie!swallows keps fomloxhnf!it bnd they

kept svooping.

J don't re ;i?what=/i>!was hoing pn







Looking at both the original Ink Polaroid, and the decompressed Ink Polaroid at the binary level we can see that some of the data has changed. The effect, however is hardly perceptible.



Looking at the binary representation of the first word ("Here's") in the original..

Original - 010010000110010101110010011001010010011101110011

JTEG - 010010000110010001110010011001010010011101110010

As we can see only 2 bits of the initial 48 were changed from the original to the JTEG decompressed version.

Conclusion


As we can see from the above example, JTEG is a viable means of Ink Polaroid image compression. While some image loss can occur during the translation, the effect is hardly noticeable to the naked eye.


-- big thanks to JD for the idea for this article, and expert advice.

7.24.2007

APP: Google Earth™ Path Measurer

I use Google Earth frequently to plan out bike rides and hikes. One frustration I have faced in Google Earth is with using the built in path measuring tool. While you can trace your path with this tool and get the overall distance, it does not allow you to save the measured path. To save paths you need to upgrade to a Google Earth Plus account, which costs 20$ per year. I figured I would bite the bullet and upgrade my account, to be able to save paths that I create. So 20$ later I was the proud owner of a Plus account.

One small problem.. While the plus account allows you to create and save paths, it DOES NOT allow you to measure them! In order to measure the paths you create, you need to retrace them using the built in measuring tool. Whoops.

Frustrated with this problem, I decided to create a custom application to allow me to measure the paths I create in Google Earth without having to retrace them with the measuring tool.

I have decided to post my application for free download, in case anyone else is facing similar challenges. You can download the app here. An overview and details of its use follow below.

The KML Path Measurer

KML Path Measurer application screenshot

Overview

This application will measure paths in Google Earth, either saved in KML Files, or copied from the clipboard. The application uses the haversine formula to measure distances between points on a spherical object. These distances are approximate, but some test calculations I have made, show that they are in line with Google Earth's built in measuring tool calculations. The application handles files or clipboard KML containing multiple paths.

The application will also give you the option to automatically update the path's description with the calculated distance. The path can then be imported back into Google Earth.

Features

  • Measures Google Earth Paths either saved as KML files or copied from clipboard.
  • Option to automatically update path descriptions with calculated distance
  • Results in-line with Google Earth internal measuring tool

System Requirements

  • Microsoft Windows™ (Tested on XP and Vista)
  • Microsoft .NET Framework 2.0(Already installed on most Win Machines)
  • Google Earth™ (Plus account required to save paths)

Download

The application can be downloaded from here. This is a self installing msi file. The msi file is large (400K) but the actual application is only about 150K including the help file.

Installation

To install simply execute the downloaded msi file, and follow the on-screen prompts.

Application Use

Working with Paths exported as KML

First, you need to create a new path file in Google Earth. Clicking the create path button should pop up a window like this.

Creating a new path in Google Earth

Next trace out your path, name it, and click the OK button.

Here is an example path I created.

Sample Google Earth Path

Now save the path file as a KML file by right clicking the path in Places and choosing "Save as..".

Path Save As

When the dialog box appears, choose "Kml" in the save as type box, and click "Save".

Save KML Dialog Box

Now start the KML Path Measurer application. Click the "Calculate Distance from KML Path File" button. This will open a window to select a KML file. Select the file you just saved from Google Earth.

Update KML Dialog

The measurer application will ask you if you want to update the path description with the calculated distance. Choose yes if you want to have this automatically updated.

The application now displays the distances of any paths it finds in the files.

KML Path Measurer with calculated distance

If you chose to update the KML, the path can now be reopened in Google Earth. This will display the updated distance in its description field. To reimport the path, click File > Open in Google Earth and select the KML file. The path's distance is now displayed.Updated Path with distance in Google Earth

Working With Paths Copied to the Clipboard

Copy PathPaths can also be measured after being copied to the clipboard from Google Earth. Simply right click on the path or folder of paths in Google Earth, and select copy.

Now simply click the "Calculate Distance from Clipboard" button in the KML Path Measurer application, and it will calculate the distances for any paths you copied. It will also ask if you would like to update the paths with the calculated distances. If you choose to do this the updated KML will be copied back to the clipboard, ready to be pasted back into Google Earth.

To update the path in Google Earth, just right click your places folder and choose "Paste". The updated path is pasted back into Google Earth.

Contact

If you have any questions, or find any bugs, please feel free to contact me at whaleyadmin@gmail.com. I will make every effort to answer your queries as quickly as possible.

Legal

The KML Path Measurer application is Copyright 2007 by C. Donato. This application may be used free of charge for non-commercial purposes. The software may be distributed as long as the original author is credited properly, and no fee is transacted. The author assumes no liability for any damages related to the use or misuse of the KML Path Measurer Application. This product is not endorsed by Google.
*Google Earth is a trademark of Google Inc.