![]() This file can be distributed as a complete file Here you can see the large KMZ file that was produced with the photos embedded in it.The generic icons are used to mark the points and the photo filenames are used to label them, these filenames were assigned to the Name attribute in the KML properties transformer in the previous slideTo finish you right click on the document to save the file as a KMZ file and to package the photos with the KML fileHere you can see the dialog to save the KMZ file Here is the KML file opened in Google Earth.Next you can double-click on this file to open it in Google Earth Here you can see the output KML file in the same folder as the photos, it is necessary for it to be in this location. ![]() An HTML div element is used to contain the imageNext the feature name is set in the output KML file so that the main document will have a meaningful nameFinally the workspace is run, all of the JPEG files to be put into the KML file are selected as the input JPEG files and the output KML file is named to be in same folder as the JPEG files The content for the balloon that appears when the point is clicked on is set to HTML and its content can be set by clicking on the button beside its boxIn the HTML content you can see that we are referencing the photo filename as the source for the image. The filename of the photo is included as an additional file and it’s path is left blank since it is in the same folder as the KML file. Here in its properties you can see the Name attribute is set to the photo file name (which is obtained from the parsed string created by the first transformer), this name will appear beside the photo point in Google Earth. This transformer obtains the GPS coordinates from the photos EXIF file header and turns the input photo feature into a point for the KML fileThe third and last transformer to set the key properties in the KML file is added next. The different parts are put into the Filename_parts with the name of the photo in the third partNext the JpegGPSPointReplacer transformer is added from the FME Store. A regular expression is used to separate the complete filename and path into the parts. So the basic workbench process was accomplished with just three transformers, with the help of a complex transformer JpegGPSPointReplacer that was obtained from the FME StoreFirst the process was generated with the wizard selecting the input data as a jpeg reader and the output as a KML file readerNext the input data fme_dataset attribute is exposed so that the photo filename can be accessedNext a StringSearcher transformer is added to parse the fme_dataset name into three parts with the third part being the file name of the photo.The entire process would be run in three steps:Run workbench process to produce KML fileOpen KML file in Google EarthSave KMZ file from Google EarthNext the workbench process would be enhanced with just a few more transformers and a minimal amount of extra work to add to custom icons, point labels and the photo points organized into different types of features to the KML file Then a KMZ file could be produced from Google Earth with the photos embedded for easy distribution. The idea was to create a workbench process that used just a few transformers to read geotagged photos (I used ones produced with my cell phone with its built in GPS) and create a KML file that would be used in Google Earth to display the photos as points and display the photos when the points are clicked. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |