How to Convert JPEG to KML
- 1). Open your Web browser, and open the link found in the Resources section to access the code repository for JPEG-to-KML file conversions provided by Google.
- 2). Obtain the Python script provided on the Web page, and save it to the same directory in which you have your JPEG images stored.
- 3). Run the "process_file()" function from your command line prompt to extract the EXIF image data headers. EXIF is the file format embedded in JPEG files that contains image metadata.
- 4). Convert the EXIF geo metadata from a ratio of coordinates to decimal-based numbers, which is what KML uses. Type the following command in your command line prompt, and press "Enter":
def DmsToDecimal(degree_num, degree_den, minute_num, minute_den, second_num, second_den): - 5). Convert the JPEG and EXIF geo metadata into a KML file by typing the following command in your command line prompt and pressing "Enter":
def CreatePhotoOverlay(kml_doc, file_name, the_file, file_iterator):
Source...