More

Advanced python labeling in ArcMap - working with null values

Advanced python labeling in ArcMap - working with null values


I'm trying to label certain features using a specific field (osm_name_58_en). However, when this field is null, I want to label the feature with (som_english_32_name). If both are null then I want to label with the (amenity) field.

This is the code I'm trying but I'm not getting anything in return. Maybe I'm completely out to left field? I'm a python and advanced labeling newbie.

def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not ([osm_name_58_en] is None): return [osm_name_58_en] elif ([osm_name_58_en] is None and not([osm_english_32_name] is None)): return [osm_english_32_name] + '
' + [amenity] else: return [amenity];

The Correct form of your code is :

def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not ([osm_name_58_en] is None): return [osm_name_58_en] elif not([osm_english_32_name] is None): return [osm_english_32_name] + '
' + [amenity] else: return [amenity]

The semicolon in the last line is removed. and your elif statement is repaired


The code presented in your question doesn't match what is asked for in the question.

"I'm trying to label certain features using a specific field (osm_name_58_en). However, when this field is null, I want to label the feature with (som_english_32_name). If both are null then I want to label with the (amenity) field."

This sentence implies that you only want one field for any given label.

If this is the case the following code will do what you want.

def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not [osm_name_58_en] is None: return [osm_name_58_en] elif not [osm_english_32_name] is None: return [osm_english_32_name] elif not [amenity] is None: return [amenity]

Now, if you want to get the code in the question working correctly here is what you need.

def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not ([osm_name_58_en] is None): return [osm_name_58_en] elif not([osm_english_32_name] is None): return [osm_english_32_name] + '
' + [amenity] else: return [amenity]

Handling outliers and Null values in Decision tree

Outliers : As I understand, decision trees are robust to outliers. Can anybody please confirm if my hypothesis is right with an example? (What if I have a features ranging from 0 to 9 but there is an outlier of which value is 10000?) Whether it creates a separate leaf for that outlier sample or would it be merged with some other tree's leaves?

NULL Values : Do we need to replace the null values before building the model using Decision tree or it would be taken care automatically by the decision tree technique?


Water Geometric Network Editing and Analysis

Water Geometric Network Editing and Analysis can be used to map and manage asset information using a geometric network.

Requirements

Water Geometric Network Editing and Analysis requires specific technical experience and software.

Desktop
Data Publishing

What you get

When you download the Water Geometric Network Editing and Analysis, you'll find the following in the zip file:

The Attribute Assistant provides a series of predefined methods to automatically populate attributes (for example, assign valve size based on the water main feature it intersects) when features are created and updated.

Water Utility Network Tools provides the Water Utility Editing toolbar, Water Utility Network Reporting toolbar, and a set of construction tools.

What's new

Below are the release dates and notes for Water Geometric Network Editing and Analysis.


3. What is panel data?

Panel data is also a time based dataset.

The difference is that, in addition to time series, it also contains one or more related variables that are measured for the same time periods.

Typically, the columns present in panel data contain explanatory variables that can be helpful in predicting the Y, provided those columns will be available at the future forecasting period.

An example of panel data is shown below. Panel Data


What for

Bubble maps are used with two types of dataset:

a list of geographic coordinates (longitude and latitude) and a numeric variable controling the size of the bubble. In the previous example, the number of tweet at each unique pair of coordinate was used.

a list of regions with attributed values and knwon boundary. In this case, the bubble map will replace the usual choropleth map. Note that it allows to avoid the bias caused by different regional area in choropleth maps. (big regions tend to have more weight during the observation).


Advanced python labeling in ArcMap - working with null values - Geographic Information Systems

OSXPhotos provides the ability to interact with and query Apple's Photos.app library on macOS. You can query the Photos library database — for example, file name, file path, and metadata such as keywords/tags, persons/faces, albums, etc. You can also easily export both the original and edited photos.

Supported operating systems

Only works on macOS (aka Mac OS X). Tested on macOS Sierra (10.12.6) until macOS Big Sur (10.16/11.3).

If you have access to the macOS 12 / Monterey beta and would like to help ensure osxphotos is compatible, please visit the Discussions page and let me know!

macOS Version macOS name Photos.app version
12.0 Monterey ?.0 UNKNOWN
10.16, 11.0-11.4 Big Sur 6.0 ✅
10.15.1 - 10.15.7 Catalina 5.0 ✅
10.14.5, 10.14.6 Mojave 4.0 ✅
10.13.6 High Sierra 3.0 ✅
10.12.6 Sierra 2.0 ✅

This package will read Photos databases for any supported version on any supported macOS version. E.g. you can read a database created with Photos 5.0 on MacOS 10.15 on a machine running macOS 10.12 and vice versa.

If you are new to python, I recommend you to install using pipx. See other advanced options below.

If you aren't familiar with installing python applications, I recommend you install osxphotos with pipx. If you use pipx , you will not need to create a virtual environment as pipx takes care of this. The easiest way to do this on a Mac is to use homebrew:

  • Open Terminal (search for Terminal in Spotlight or look in Applications/Utilities )
  • Install homebrew according to instructions at https://brew.sh/
  • Type the following into Terminal: brew install pipx
  • Then type this: pipx install osxphotos
  • Now you should be able to run osxphotos by typing: osxphotos

Once you've installed osxphotos with pipx, to upgrade to the latest version:

You can also install directly from pypi:

Once you've installed osxphotos with pip, to upgrade to the latest version:

Installation from git repository

OSXPhotos uses setuptools, thus simply run:

I recommend you create a virtual environment before installing osxphotos.

WARNING The git repo for this project is very large (> 1GB) because it contains multiple Photos libraries used for testing on different versions of macOS. If you just want to use the osxphotos package in your own code, I recommend you install the latest version from PyPI which does not include all the test libraries. If you just want to use the command line utility, you can download a pre-built executable of the latest release or you can install via pip which also installs the command line app. If you aren't comfortable with running python on your Mac, start with the pre-built executable or pipx as described above.

Once you've installed osxphotos via the git repository, to upgrade to the latest version:

Installing pre-built executable

You can also download a stand-alone pre-built executable--that doesn't require installing python--from the releases page. Look for the file with a name similar to osxphotos_MacOS_exe_darwin_x64_v0.42.9.zip . In this case v0.42.9 specifies version 0.42.9. Unzip the file and put the included osxphotos binary in your system path. Currently, the binary is not signed or notarized so you'll have to authorize the app to run in the System Preferences | Security & Privacy settings. It's also likely this executable will not run on M1 Macs. If you don't know how to do this, I recommend using pipx as described above.

This package will install a command line utility called osxphotos that allows you to query the Photos database. Alternatively, you can also run the command line utility like this: python3 -m osxphotos

To get help on a specific command, use osxphotos help <command_name>

/Desktop/export group in folders by date created

osxphotos export --export-by-date

Note: Photos library/database path can also be specified using --db option:

osxphotos export --export-by-date --db

find all photos with keyword "Kids" and output results to json file named results.json:

osxphotos query --keyword Kids --json

/Pictures/Photos Library.photoslibrary >results.json

Find all videos larger than 200MB and add them to an album named "Big Videos" in Photos, creating the album if necessary

osxphotos query --only-movies --min-size 200MB --add-to-album "Big Videos"

The design philosophy for osxphotos is "make the easy things easy and make the hard things possible". To "make the hard things possible", osxphotos is very flexible and has many, many configuration options -- the export command for example, has over 100 command line options. Thus, osxphotos may seem daunting at first. The purpose of this tutorial is to explain a number of common use cases with examples and, hopefully, make osxphotos less daunting to use. osxphotos includes several commands for retrieving information from your Photos library but the one most users are interested in is the export command which exports photos from the library so that's the focus of this tutorial.

osxphotos export /path/to/export

This command exports all your photos to the /path/to/export directory.

Note: osxphotos uses the term 'photo' to refer to a generic media asset in your Photos Library. A photo may be an image, a video file, a combination of still image and video file (e.g. an Apple "Live Photo" which is an image and an associated "live preview" video file), a JPEG image with an associated RAW image, etc.

While the previous command will export all your photos (and videos--see note above), it probably doesn't do exactly what you want. In the previous example, all the photos will be exported to a single folder: /path/to/export . If you have a large library with thousands of images and videos, this likely isn't very useful. You can use the --export-by-date option to export photos to a folder structure organized by year, month, day, e.g. 2021/04/21 :

osxphotos export /path/to/export --export-by-date

With this command, a photo that was created on 31 May 2015 would be exported to: /path/to/export/2015/05/31

Specify directory structure

If you prefer a different directory structure for your exported images, osxphotos provides a very flexible Template System that allows you to specify the directory structure using the --directory option. For example, this command exported to a directory structure that looks like: 2015/May (4-digit year / month name):

The string following --directory is an osxphotos template string . Template strings are widely used throughout osxphotos and it's worth your time to learn more about them. In a template string, the values between the curly braces, e.g. are replaced with metadata from the photo being exported. In this case, is the 4-digit year of the photo's creation date and is the full month name in the user's locale (e.g. May , mai , etc.). In the osxphotos template system these are referred to as template fields. The text not included between <> pairs is interpreted literally, in this case / , is a directory separator.

osxphotos provides access to almost all the metadata known to Photos about your images. For example, Photos performs reverse geolocation lookup on photos that contain GPS coordinates to assign place names to the photo. Using the --directory template, you could thus export photos organized by country name:

Of course, some photos might not have an associated place name so the template system allows you specify a default value to use if a template field is null (has no value).

The value after the ',' in the template string is the default value, in this case 'No-Country'. Note: If you don't specify a default value and a template field is null, osxphotos will use "_" (underscore character) as the default.

Some template fields, such as , may expand to more than one value. For example, if a photo has keywords of "Travel" and "Vacation", would expand to "Travel", "Vacation". When used with --directory , this would result in the photo being exported to more than one directory (thus more than one copy of the photo would be exported). For example, if IMG_1234.JPG has keywords Travel , and Vacation and you run the following command:

osxphotos export /path/to/export --directory ""

the exported files would be:

Specify exported filename

By default, osxphotos will use the original filename of the photo when exporting. That is, the filename the photo had when it was taken or imported into Photos. This is often something like IMG_1234.JPG or DSC05678.dng . osxphotos allows you to specify a custom filename template using the --filename option in the same way as --directory allows you to specify a custom directory name. For example, Photos allows you specify a title or caption for a photo and you can use this in place of the original filename:

osxphotos export /path/to/export --filename ""<p> <p>The above command will export photos using the title. Note that you don't need to specify the extension as part of the --filename template as osxphotos will automatically add the correct file extension. Some photos might not have a title so in this case, you could use the default value feature to specify a different name for these photos. For example, to use the title as the filename, but if no title is specified, use the original filename instead:</p> <p>The osxphotos template system also allows for limited conditional logic of the type "If a condition is true then do one thing, otherwise, do a different thing". For example, you can use the --filename option to name files that are marked as "Favorites" in Photos differently than other files. For example, to add a "#" to the name of every photo that's a favorite:</p> <p>Like with --directory , using a multi-valued template field such as <keyword>may result in more than one copy of a photo being exported. For example, if IMG_1234.JPG has keywords Travel , and Vacation and you run the following command:<p> <p>osxphotos export /path/to/export --filename "<keyword>-<original_name>"<p> <p>the exported files would be:</p> <p>If a photo has been edited in Photos (e.g. cropped, adjusted, etc.) there will be both an original image and an edited image in the Photos Library. By default, osxphotos will export both the original and the edited image. To distinguish between them, osxphotos will append "_edited" to the edited image. For example, if the original image was named IMG_1234.JPG , osxphotos will export the original as IMG_1234.JPG and the edited version as IMG_1234_edited.jpeg . <strong>Note:</strong> Photos changes the extension of edited images to ".jpeg" even if the original was named ".JPG". You can change the suffix appended to edited images using the --edited-suffix option:</p> <p>osxphotos export /path/to/export --edited-suffix "_EDIT"</p> <p>In this example, the edited image would be named IMG_1234_EDIT.jpeg . Like many options in osxphotos, the --edited-suffix option can evaluate an osxphotos template string so you could append the modification date (the date the photo was edited) to all edited photos using this command:</p> <p>In this example, if the photo was edited on 21 April 2021, the name of the exported file would be: IMG_1234_2021-04-21.jpeg .</p> <p>You can tell osxphotos to not export edited photos (that is, only export the original unedited photos) using --skip-edited :</p> <p>osxphotos export /path/to/export --skip-edited</p> <p>You can also tell osxphotos to export either the original photo (if the photo has not been edited) or the edited photo (if it has been edited), but not both, using the --skip-original-if-edited option:</p> <p>osxphotos export /path/to/export --skip-original-if-edited</p> <p>As mentioned above, Photos renames JPEG images that have been edited with the ".jpeg" extension. Some applications use ".JPG" and others use ".jpg" or ".JPEG". You can use the --jpeg-ext option to have osxphotos rename all JPEG files with the same extension. Valid values are jpeg, jpg, JPEG, JPG e.g. --jpeg-ext jpg to use '.jpg' for all JPEGs.</p> <p>osxphotos export /path/to/export --jpeg-ext jpg</p> <p>Specifying the Photos library</p> <p>All the above commands operate on the default Photos library. Most users only use a single Photos library which is also known as the System Photo Library. It is possible to use Photos with more than one library. For example, if you hold down the "Option" key while opening Photos, you can select an alternate Photos library. If you don't specify which library to use, osxphotos will try find the last opened library. Occasionally it can't determine this and in that case, it will use the System Photos Library. If you use more than one Photos library and want to explicitly specify which library to use, you can do so with the --db option. (db is short for database and is so named because osxphotos operates on the database that Photos uses to manage your Photos library).</p> <p>osxphotos export /path/to/export --db</p> <p>osxphotos works by copying photos out of the Photos library folder to export them. You may see osxphotos report that one or more photos are missing and thus could not be exported. One possible reason for this is that you are using iCloud to synch your Photos library and Photos either hasn't yet synched the cloud library to the local Mac or you have Photos configured to "Optimize Mac Storage" in Photos Preferences. Another reason is that even if you have Photos configured to download originals to the Mac, Photos does not always download photos from shared albums or original screenshots to the Mac.</p> <p>If you encounter missing photos you can tell osxphotos to download the missing photos from iCloud using the --download-missing option. --download-missing uses AppleScript to communicate with Photos and tell it to download the missing photos. Photos' AppleScript interface is somewhat buggy and you may find that Photos crashes. In this case, osxphotos will attempt to restart Photos to resume the download process. There's also an experimental --use-photokit option that will communicate with Photos using a different "PhotoKit" interface. This option must be used together with --download-missing :</p> <p>osxphotos export /path/to/export --download-missing</p> <p>osxphotos export /path/to/export --download-missing --use-photokit</p> <p>Exporting to external disks</p> <p>If you are exporting to an external network attached storage (NAS) device, you may encounter errors if the network connection is unreliable. In this case, you can use the --retry option so that osxphotos will automatically retry the export. Use --retry with a number that specifies the number of times to retry the export:</p> <p>osxphotos export /path/to/export --retry 3</p> <p>In this example, osxphotos will attempt to export a photo up to 3 times if it encounters an error.</p> <p>Exporting metadata with exported photos</p> <p>Photos tracks a tremendous amount of metadata associated with photos in the library such as keywords, faces and persons, reverse geolocation data, and image classification labels. Photos' native export capability does not preserve most of this metadata. osxphotos can, however, access and preserve almost all the metadata associated with photos. Using the free exiftool app, osxphotos can write metadata to exported photos. Follow the instructions on the exiftool website to install exiftool then you can use the --exiftool option to write metadata to exported photos:</p> <p>osxphotos export /path/to/export --exiftool</p> <p>This will write basic metadata such as keywords, persons, and GPS location to the exported files. osxphotos includes several additional options that can be used in conjunction with --exiftool to modify the metadata that is written by exiftool . For example, you can use the --keyword-template option to specify custom keywords (again, via the osxphotos template system). For example, to use the folder and album a photo is in to create hierarchal keywords in the format used by Lightroom Classic:</p> <p>The above command will write all the regular metadata that --exiftool normally writes to the file upon export but will also add an additional keyword in the exported metadata in the form "Folder1>Folder2>Album". If you did not include the (>) in the template string (e.g. <folder_album>), folder_album would render in form "Folder1/Folder2/Album".<p> <p>A powerful feature of Photos is that it uses machine learning algorithms to automatically classify or label photos. These labels are used when you search for images in Photos but are not otherwise available to the user. osxphotos is able to read all the labels associated with a photo and makes those available through the template system via the <label>. Think of these as automatic keywords as opposed to the keywords you assign manually in Photos. One common use case is to use the automatic labels to create new keywords when exporting images so that these labels are embedded in the image's metadata:<p> <p>osxphotos export /path/to/export --exiftool --keyword-template "<label>"<p> <p><strong>Note</strong>: When evaluating templates for --directory and --filename , osxphotos inserts the automatic default value "_" for any template field which is null (empty or blank). This is to ensure that there's never a null directory or filename created. For metadata templates such as --keyword-template , osxphotos does not provide an automatic default value thus if the template field is null, no keyword would be created. Of course, you can provide a default value if desired and osxphotos will use this. For example, to add "nolabel" as a keyword for any photo that doesn't have labels:</p> <p>osxphotos export /path/to/export --exiftool --keyword-template "<label,nolabel>"<p> <p>Another way to export metadata about your photos is through the use of sidecar files. These are files that have the same name as your photo (but with a different extension) and carry the metadata. Many digital asset management applications (for example, PhotoPrism, Lightroom, Digikam, etc.) can read or write sidecar files. osxphotos can export metadata in exiftool compatible JSON and XMP formats using the --sidecar option. For example, to output metadata to XMP sidecars:</p> <p>osxphotos export /path/to/export --sidecar XMP</p> <p>Unlike --exiftool , you do not need to install exiftool to use the --sidecar feature. Many of the same configuration options that apply to --exiftool to modify metadata, for example, --keyword-template can also be used with --sidecar .</p> <p>Sidecar files are named "photoname.ext.sidecar_ext". For example, if the photo is named IMG_1234.JPG and the sidecar format is XMP, the sidecar would be named IMG_1234.JPG.XMP . Some applications expect the sidecar in this case to be named IMG_1234.XMP . You can use the -sidecar-drop-ext option to force osxphotos to name the sidecar files in this manner:</p> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1043902"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043902.js" async> </script> <!-- Composite End --> <!-- //MGID --> <p>osxphotos export /path/to/export --sidecar XMP -sidecar-drop-ext</p> <p>Updating a previous export</p> <p>If you want to use osxphotos to perform periodic backups of your Photos library rather than a one-time export, use the --update option. When osxphotos export is run, it creates a database file named .osxphotos_export.db in the export folder. (<strong>Note</strong> Because the filename starts with a ".", you won't see it in Finder which treats "dot-files" like this as hidden. You will see the file in the Terminal.) . If you run osxphotos with the --update option, it will look for this database file and, if found, use it to retrieve state information from the last time it was run to only export new or changed files. For example:</p> <p>osxphotos export /path/to/export --update</p> <p>will read the export database located in /path/to/export/.osxphotos_export.db and only export photos that have been added or changed since the last time osxphotos was run. You can run osxphotos with the --update option even if it's never been run before. If the database isn't found, osxphotos will create it. If you run osxphotos export without --update in a folder where you had previously exported photos, it will re-export all the photos. If your intent is to keep a periodic backup of your Photos Library up to date with osxphotos, you should always use --update .</p> <p>If your workflow involves moving files out of the export directory (for example, you move them into a digital asset management app) but you want to use the features of --update , you can use the --only-new with --update to force osxphotos to only export photos that are new (added to the library) since the last update. In this case, osxphotos will ignore the previously exported files that are now missing. Without --only-new , osxphotos would see that previously exported files are missing and re-export them.</p> <p>osxphotos export /path/to/export --update --only-new</p> <p>If your workflow involves editing the images you exported from Photos but you still want to maintain a backup with --update , you should use the --ignore-signature option. --ignore-signature instructs osxphotos to ignore the file's signature (for example, size and date modified) when deciding which files should be updated with --update . If you edit a file in the export directory and then run --update without --ignore-signature , osxphotos will see that the file is different than the one in the Photos library and re-export it.</p> <p>osxphotos export /path/to/export --update --ignore-signature</p> <p>You can use the --dry-run option to have osxphotos "dry run" or test an export without actually exporting any files. When combined with the --verbose option, which causes osxphotos to print out details of every file being exported, this can be a useful tool for testing your export options before actually running a full export. For example, if you are learning the template system and want to verify that your --directory and --filename templates are correct, --dry-run --verbose will print out the name of each file being exported.</p> <p>osxphotos export /path/to/export --dry-run --verbose</p> <p>Creating a report of all exported files</p> <p>You can use the --report option to create a report, in comma-separated values (CSV) format that will list the details of all files that were exported, skipped, missing, etc. This file format is compatible with programs such as Microsoft Excel. Provide the name of the report after the --report option:</p> <p>osxphotos export /path/to/export --report export.csv</p> <p>Exporting only certain photos</p> <p>By default, osxphotos will export your entire Photos library. If you want to export only certain photos, osxphotos provides a rich set of "query options" that allow you to query the Photos database to filter out only certain photos that match your query criteria. The tutorial does not cover all the query options as there are over 50 of them--read the help text ( osxphotos help export ) to better understand the available query options. No matter which subset of photos you would like to export, there is almost certainly a way for osxphotos to filter these. For example, you can filter for only images that contain certain keywords or images without a title, images from a specific time of day or specific date range, images contained in specific albums, etc.</p> <p>For example, to export only photos with keyword Travel :</p> <p>osxphotos export /path/to/export --keyword "Travel"</p> <p>Like many options in osxphotos, --keyword (and most other query options) can be repeated to search for more than one term. For example, to find photos with keyword Travel <em>or</em> keyword Vacation :</p> <p>osxphotos export /path/to/export --keyword "Travel" --keyword "Vacation"</p> <p>To export only photos contained in the album "Summer Vacation":</p> <p>osxphotos export /path/to/export --album "Summer Vacation"</p> <p>There are also a number of query options to export only certain types of photos. For example, to export only photos taken with iPhone "Portrait Mode":</p> <p>osxphotos export /path/to/export --portrait</p> <p>You can also export photos in a certain date range:</p> <p>osxphotos export /path/to/export --from-date "2020-01-01" --to-date "2020-02-28"</p> <p>Converting images to JPEG on export</p> <p>Photos can store images in many different formats. osxphotos can convert non-JPEG images (for example, RAW photos) to JPEG on export using the --convert-to-jpeg option. You can specify the JPEG quality (0: worst, 1.0: best) using --jpeg-quality . For example:</p> <p>osxphotos export /path/to/export --convert-to-jpeg --jpeg-quality 0.9</p> <p>In addition to using exiftool to write metadata directly to the image metadata, osxphotos can write certain metadata that is available to the Finder and Spotlight but does not modify the actual image file. This is done through something called extended attributes which are stored in the filesystem with a file but do not actually modify the file itself. Finder tags and Finder comments are common examples of these.</p> <p>osxphotos can, for example, write any keywords in the image to Finder tags so that you can search for images in Spotlight or the Finder using the tag:tagname syntax:</p> <p>osxphotos export /path/to/export --finder-tag-keywords</p> <p>--finder-tag-keywords also works with --keyword-template as described above in the section on exiftool :</p> <p>osxphotos export /path/to/export --finder-tag-keywords --keyword-template "<label>"<p> <p>The --xattr-template option allows you to set a variety of other extended attributes. It is used in the format --xattr-template ATTRIBUTE TEMPLATE where ATTRIBUTE is one of 'authors','comment', 'copyright', 'description', 'findercomment', 'headline', 'keywords'.</p> <p>For example, to set Finder comment to the photo's title and description:</p> <p>osxphotos export /path/to/export --xattr-template findercomment "<title><newline><descr>"<p> <p>In the template string above, <newline>instructs osxphotos to insert a new line character (" ") between the title and description. In this example, if <title>or <descr>is empty, you'll get "title " or " description" which may not be desired so you can use more advanced features of the template system to handle these cases:<p> <p>osxphotos export /path/to/export --xattr-template findercomment "<title><><><newline>,>,><descr>"<p> <p>Explanation of the template string:</p> <p>In this example, title? demonstrates use of the boolean (True/False) feature of the template system. title? is read as "Is the title True (or not blank/empty)? If so, then the value immediately following the ? is used in place of title . If title is blank, then the value immediately following the comma is used instead. The format for boolean fields is field?value if true,value if false . Either value if true or value if false may be blank, in which case a blank string ("") is used for the value and both may also be an entirely new template string as seen in the above example. Using this format, template strings may be nested inside each other to form complex if-then-else statements.</p> <p>The above example, while complex to read, shows how flexible the osxphotos template system is. If you invest a little time learning how to use the template system you can easily handle almost any use case you have.</p> <p>See Extended Attributes section in the help for osxphotos export for additional information about this feature.</p> <p>Saving and loading options</p> <p>If you repeatedly run a complex osxphotos export command (for example, to regularly back-up your Photos library), you can save all the options to a configuration file for future use ( --save-config FILE ) and then load them ( --load-config FILE ) instead of repeating each option on the command line.</p> <p>To save the configuration:</p> <p>osxphotos export /path/to/export <all your options here> --update --save-config osxphotos.toml</p> <p>Then the next to you run osxphotos, you can simply do this:</p> <p>osxphotos export /path/to/export --load-config osxphotos.toml</p> <p>The configuration file is a plain text file in TOML format so the .toml extension is standard but you can name the file anything you like.</p> <p>Run commands on exported photos for post-processing</p> <p>You can use the --post-command option to run one or more commands against exported files. The --post-command option takes two arguments: CATEGORY and COMMAND. CATEGORY is a string that describes which category of file to run the command against. The available categories are described in the help text available via: osxphotos help export . For example, the exported category includes all exported photos and the skipped category includes all photos that were skipped when running export with --update . COMMAND is an osxphotos template string which will be rendered then passed to the shell for execution.</p> <p>For example, the following command generates a log of all exported files and their associated keywords:</p> <p>The special template field <shell_quote>ensures a string is properly quoted for execution in the shell. For example, it's possible that a file path or keyword in this example has a space in the value and if not properly quoted, this would cause an error in the execution of the command. When running commands, the template <filepath>is set to the full path of the exported file and <export_dir>is set to the full path of the base export directory.<p> <p>Explanation of the template string:</p> <p>Another example: if you had exiftool installed and wanted to wipe all metadata from all exported files, you could use the following:</p> <p>osxphotos export /path/to/export --post-command exported "/usr/local/bin/exiftool -all= <filepath|shell_quote>"<p> <p>This command uses the |shell_quote template filter instead of the <shell_quote>template because the only thing that needs to be quoted is the path to the exported file. Template filters filter the value of the rendered template field. A number of other filters are available and are described in the help text.<p> <p>An example from an actual osxphotos user</p> <p>Here's a comprehensive use case from an actual osxphotos user that integrates many of the concepts discussed in this tutorial (thank-you Philippe for contributing this!):</p> <p>/Desktop/folder for exported videos/ --keyword Quik --only-movies --db /path to my.photoslibrary --touch-file --finder-tag-keywords --person-keyword --xattr-template findercomment "<title><><><newline>,>,><descr>" --exiftool-merge-keywords --exiftool-merge-persons --exiftool --strip<p> <p>osxphotos is very flexible. If you merely want to backup your Photos library, then spending a few minutes to understand the --directory option is likely all you need and you can be up and running in minutes. However, if you have a more complex workflow, osxphotos likely provides options to implement your workflow. This tutorial does not attempt to cover every option offered by osxphotos but hopefully it provides a good understanding of what kinds of things are possible and where to explore if you want to learn more.</p> <p>Command line reference: export</p> <p>Example uses of the package</p> <p>Read a Photos library database</p> <p>Reads the Photos library database and returns a PhotosDB object.</p> <p>Pass the path to a Photos library or to a specific database file (e.g. "/Users/smith/Pictures/Photos Library.photoslibrary" or "/Users/smith/Pictures/Photos Library.photoslibrary/database/photos.db"). Normally, it's recommended you pass the path the .photoslibrary folder, not the actual database path. <strong>Note</strong>: In Photos, users may specify a different library to open by holding down the <em>option</em> key while opening Photos.app. See also get_last_library_path and get_system_library_path</p> <p>If an invalid path is passed, PhotosDB will raise FileNotFoundError exception.</p> <p><strong>Note</strong>: If neither path or dbfile is passed, PhotosDB will use get_last_library_path to open the last opened Photos library. This usually works but is not 100% reliable. It can also lead to loading a different library than expected if the user has held down <em>option</em> key when opening Photos to switch libraries. You may therefore want to explicitely pass the path to PhotosDB() .</p> <p>Open the default (last opened) Photos library</p> <p>The default library is the library that would open if the user opened Photos.app.</p> <p>Open System Photos library</p> <p>In Photos 5 (Catalina / MacOS 10.15), you can use get_system_library_path() to get the path to the System photo library if you want to ensure PhotosDB opens the system library. This does not work on older versions of MacOS. E.g.</p> <p>Open a specific Photos library</p> <p>Pass the fully qualified path to the Photos library or the actual database file inside the library. The database is called photos.db and resides in the database folder in your Photos library. If you pass only the path to the library, PhotosDB will add the database path automatically. The option to pass the actual database path is provided so database files can be queried even if separated from the actual .photoslibrary file.</p> <p>Returns a PhotosDB object.</p> <p><strong>Note</strong>: If you have a large library (e.g. many thousdands of photos), creating the PhotosDB object can take a long time (10s of seconds). See Implementation Notes for additional details.</p> <p>Returns a list of the keywords found in the Photos library</p> <p>Returns a list of AlbumInfo objects representing albums in the database or empty list if there are no albums. See also albums and burst_album_info.</p> <p>Returns a list of the album names found in the Photos library. See also burst_albums.</p> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1043902"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043902.js" async> </script> <!-- Composite End --> <!-- //MGID --> <p><strong>Note</strong>: In Photos 5.0 (MacOS 10.15/Catalina), It is possible to have more than one album with the same name in Photos. Albums with duplicate names are treated as a single album and the photos in each are combined. For example, if you have two albums named "Wedding" and each has 2 photos, osxphotos will treat this as a single album named "Wedding" with 4 photos in it.</p> <p>Returns list of shared album names found in photos database (e.g. albums shared via iCloud photo sharing)</p> <p><strong>Note</strong>: <em>Only valid for Photos 5 / MacOS 10.15</em> on Photos <= 4, prints warning and returns empty list.</p> <p>Returns a list of ImportInfo objects representing the import sessions for the database.</p> <p>Returns a list of FolderInfo objects representing top level folders in the database or empty list if there are no folders. See also folders.</p> <p><strong>Note</strong>: Currently folder_info is only implemented for Photos 5 (Catalina) will return empty list and output warning if called on earlier database versions.</p> <p>Returns a list names of top level folder names in the database.</p> <p><strong>Note</strong>: Currently folders is only implemented for Photos 5 (Catalina) will return empty list and output warning if called on earlier database versions.</p> <p>Returns a list of the person names (faces) found in the Photos library. <strong>Note</strong>: It is of course possible to have more than one person with the same name, e.g. "Maria Smith", in the database. persons assumes these are the same person and will list only one person named "Maria Smith". If you need more information about persons in the database, see person_info.</p> <p>Returns a list of PersonInfo objects representing persons who appear in photos in the database.</p> <p>Returns a dictionary of keywords found in the Photos library where key is the keyword and value is the count of how many times that keyword appears in the library (ie. how many photos are tagged with the keyword). Resulting dictionary is in reverse sorted order (e.g. keyword with the highest count is first).</p> <p>Returns a dictionary of persons (faces) found in the Photos library where key is the person name and value is the count of how many times that person appears in the library (ie. how many photos are tagged with the person). Resulting dictionary is in reverse sorted order (e.g. person who appears in the most photos is listed first). <strong>Note</strong>: It is of course possible to have more than one person with the same name, e.g. "Maria Smith", in the database. persons_as_dict assumes these are the same person and will list only one person named "Maria Smith". If you need more information about persons in the database, see person_info.</p> <p>Returns a dictionary of albums found in the Photos library where key is the album name and value is the count of how many photos are in the album. Resulting dictionary is in reverse sorted order (e.g. album with the most photos is listed first).</p> <p><strong>Note</strong>: In Photos 5.0 (MacOS 10.15/Catalina), It is possible to have more than one album with the same name in Photos. Albums with duplicate names are treated as a single album and the photos in each are combined. For example, if you have two albums named "Wedding" and each has 2 photos, osxphotos will treat this as a single album named "Wedding" with 4 photos in it.</p> <p>Returns a dictionary of shared albums (e.g. shared via iCloud photo sharing) found in the Photos library where key is the album name and value is the count of how many photos are in the album. Resulting dictionary is in reverse sorted order (e.g. album with the most photos is listed first).</p> <p><strong>Note</strong>: <em>Photos 5 / MacOS 10.15 only</em>. On earlier versions of Photos, prints warning and returns empty dictionary.</p> <p>Returns image categorization labels associated with photos in the library as list of str.</p> <p><strong>Note</strong>: Only valid on Photos 5 on earlier versions, returns empty list. In Photos 5, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels_normalized.</p> <p>Returns image categorization labels associated with photos in the library as list of str. Labels are normalized (e.g. converted to lower case). Use of normalized strings makes it easier to search if you don't how Apple capitalizes a label.</p> <p><strong>Note</strong>: Only valid on Photos 5 on earlier versions, returns empty list. In Photos 5, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels.</p> <p>Returns dictionary image categorization labels associated with photos in the library where key is label and value is number of photos in the library with the label.</p> <p><strong>Note</strong>: Only valid on Photos 5 on earlier versions, logs warning and returns empty dict. In Photos 5, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels_normalized_as_dict.</p> <p>Returns dictionary of image categorization labels associated with photos in the library where key is normalized label and value is number of photos in the library with that label. Labels are normalized (e.g. converted to lower case). Use of normalized strings makes it easier to search if you don't how Apple capitalizes a label.</p> <p><strong>Note</strong>: Only valid on Photos 5 on earlier versions, logs warning and returns empty dict. In Photos 5, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels_as_dict.</p> <p>Returns the path to the Photos library as a string</p> <p>Returns the path to the Photos database PhotosDB was initialized with</p> <p>Returns the version number for Photos library database. You likely won't need this but it's provided in case needed for debugging. PhotosDB will print a warning to sys.stderr if you open a database version that has not been tested.</p> <p>Returns tuple of (connection, cursor) for the working copy of the Photos database. This is useful for debugging or prototyping new features.</p> <p>Returns a list of PhotoInfo objects. Each PhotoInfo object represents a photo in the Photos Libary.</p> <p>If called with no parameters, returns a list of every photo in the Photos library.</p> <p>May be called with one or more of the following parameters:</p> <ul> <li>keywords : list of one or more keywords. Returns only photos containing the keyword(s). If more than one keyword is provided finds photos matching any of the keywords (e.g. treated as "or")</li> <li>uuid : list of one or more uuids. Returns only photos whos UUID matches. <strong>Note</strong>: The UUID is the universally unique identifier that the Photos database uses to identify each photo. You shouldn't normally need to use this but it is a way to access a specific photo if you know the UUID. If more than more uuid is provided, returns photos that match any of the uuids (e.g. treated as "or")</li> <li>persons : list of one or more persons. Returns only photos containing the person(s). If more than one person provided, returns photos that match any of the persons (e.g. treated as "or")</li> <li>albums : list of one or more album names. Returns only photos contained in the album(s). If more than one album name is provided, returns photos contained in any of the albums (.e.g. treated as "or")</li> <li>images : bool if True, returns photos/images default is True</li> <li>movies : bool if True, returns movies/videos default is True</li> <li>from_date : datetime.datetime if provided, finds photos where creation date >= from_date default is None</li> <li>to_date : datetime.datetime if provided, finds photos where creation date <= to_date default is None</li> <li>intrash : if True, finds only photos in the "Recently Deleted" or trash folder, if False does not find any photos in the trash default is False</li></ul> <p>See also get_photo() which is much faster for retrieving a single photo.</p> <p>If more than one of (keywords, uuid, persons, albums,from_date, to_date) is provided, they are treated as "and" criteria. E.g.</p> <p>Finds all photos with (keyword = "wedding" or "birthday") and (persons = "Juan Rodriguez")</p> <p>Find all photos tagged with keyword "wedding":</p> <p>Find all photos of Maria Smith</p> <p>Find all photos in album "Summer Vacation" or album "Ski Trip"</p> <p>Find the single photo with uuid = "osMNIO5sQFGZTbj9WrydRB"</p> <p>If you need to do more complicated searches, you can do this programmaticaly. For example, find photos with keyword = "Kids" but not in album "Vacation 2019"</p> <p><strong>Note</strong> PhotosDB.photos() may return a different number of photos than Photos.app reports in the GUI. This is because photos() returns hidden photos, shared photos, and for burst photos, all selected burst images even if non-selected burst images have not been deleted. Photos only reports 1 single photo for each set of burst images until you "finalize" the burst by selecting key photos and deleting the others using the "Make a selection" option.</p> <p>For example, in my library, Photos says I have 19,386 photos and 474 movies. However, PhotosDB.photos() reports 25,002 photos. The difference is due to 5,609 shared photos and 7 hidden photos. (<em>Note</em> Shared photos only valid for Photos 5). Similarly, filtering for just movies returns 625 results. The difference between 625 and 474 reported by Photos is due to 151 shared movies.</p> <p>Returns a single PhotoInfo instance for photo with UUID matching uuid or None if no photo is found matching uuid . If you know the UUID of a photo, get_photo() is much faster than photos . See also photos().</p> <p>PhotosDB.photos() returns a list of PhotoInfo objects. Each PhotoInfo object represents a single photo in the Photos library.</p> <p>Returns the universally unique identifier (uuid) of the photo. This is how Photos keeps track of individual photos within the database.</p> <p>Returns the current filename of the photo on disk. See also original_filename</p> <p>Returns the original filename of the photo when it was imported to Photos. <strong>Note</strong>: Photos 5.0+ renames the photo when it adds the file to the library using UUID. See also filename</p> <p>Returns the create date of the photo as a datetime.datetime object</p> <p>Returns the date the photo was added to the Photos library as a timezone aware datetime.datetime object, or None if the data added cannot be determined</p> <p>Returns the modification date of the photo as a datetime.datetime object or None if photo has no modification date</p> <p>Returns the description of the photo</p> <p>Returns the title of the photo</p> <p>Returns a list of keywords (e.g. tags) applied to the photo</p> <p>Returns a list of albums the photo is contained in. See also album_info.</p> <p>Returns a list of AlbumInfo objects representing the albums the photo is contained in. See also albums.</p> <p>Returns an ImportInfo object representing the import session associated with the photo or None if there is no associated import session.</p> <p>Returns a list of the names of the persons in the photo</p> <p>Returns a list of PersonInfo objects representing persons in the photo. Each PersonInfo object is associated with one or more FaceInfo objects.</p> <p>Returns a list of FaceInfo objects representing faces in the photo. Each face is associated with the a PersonInfo object.</p> <p>Returns the absolute path to the photo on disk as a string. <strong>Note</strong>: this returns the path to the <em>original</em> unedited file (see hasadjustments). If the file is missing on disk, path= None (see ismissing).</p> <p>Returns the absolute path to the edited photo on disk as a string. If the photo has not been edited, returns None . See also path and hasadjustments.</p> <p><strong>Note</strong>: will also return None if the edited photo is missing on disk.</p> <p>Returns list of paths to any derivative preview images associated with the photo. The list of returned paths is sorted in descieding order by size (the largest, presumably highest quality) preview image will be the first element in the returned list. These will be named something like this on Photos 5+:</p> <ul> <li>F19E06B8-A712-4B5C-907A-C007D37BDA16_1_101_o.jpeg</li> <li>F19E06B8-A712-4B5C-907A-C007D37BDA16_1_102_o.jpeg</li> <li>F19E06B8-A712-4B5C-907A-C007D37BDA16_1_105_c.jpeg</li></ul> <p>On Photos <=4, they'll be named something like:</p> <ul> <li>UNADJUSTEDNONRAW_mini_6.jpg</li> <li>UNADJUSTEDNONRAW_thumb_6.jpg</li> <li>Y6OofYkbR96spbS6XgwOQw_mini_1.jpg</li></ul> <p>I've not yet decoded the suffixes to know which preview is used for which purpose but in general, if you look for the largest file, you'll get the highest resolution preview. Note that video files and Live images may have both a .mov video preview as well as a .jpeg still-image preview (the JPEG file is the one Photos displays as the "cover" for the video.)</p> <p>Returns empty list if no preview images are found.</p> <p>Returns the absolute path to the associated raw photo on disk as a string, if photo is part of a RAW+JPEG pair, otherwise returns None. See notes on Raw Photos.</p> <p>Returns True if photo has an associated raw image, otherwise False. (e.g. Photo is a RAW+JPEG pair). See also is_raw and notes on Raw Photos.</p> <p>Returns True if photo is a raw image. E.g. it was imported as a single raw image, not part of a RAW+JPEG pair. See also has_raw and .</p> <p>Returns True if associated raw image and the raw image is selected in Photos via "Use RAW as Original", otherwise returns False. See notes on Raw Photos.</p> <p>Returns height of the photo in pixels. If image has been edited, returns height of the edited image, otherwise returns height of the original image. See also original_height.</p> <p>Returns width of the photo in pixels. If image has been edited, returns width of the edited image, otherwise returns width of the original image. See also original_width.</p> <p>Returns EXIF orientation value of the photo as integer. If image has been edited, returns orientation of the edited image, otherwise returns orientation of the original image. See also original_orientation. If orientation cannot be determined, returns 0 (this happens if osxphotos cannot decode the adjustment info for an edited image).</p> <p>Returns height of the original photo in pixels. See also height.</p> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1043902"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043902.js" async> </script> <!-- Composite End --> <!-- //MGID --> <p>Returns width of the original photo in pixels. See also width.</p> <p>Returns EXIF orientation value of the original photo as integer. See also orientation.</p> <p>Returns size of the original photo in bytes as integer.</p> <p>Returns True if the original image file is missing on disk, otherwise False . This can occur if the file has been uploaded to iCloud but not yet downloaded to the local library or if the file was deleted or imported from a disk that has been unmounted and user hasn't enabled "Copy items to the Photos library" in Photos preferences. <strong>Note</strong>: this status is computed based on data in the Photos library and ismissing does not verify if the photo is actually missing. See also path.</p> <p>Returns True if the picture has been edited, otherwise False</p> <p>On Photos 5+, returns an AdjustmentsInfo object representing the adjustments (edits) to the photo or None if there are no adjustments. On earlier versions of Photos, always returns None.</p> <p>Returns True if the picture was edited in an external editor (outside Photos.app), otherwise False</p> <p>Returns True if the picture has been marked as a favorite, otherwise False</p> <p>Returns True if the picture has been marked as hidden, otherwise False</p> <p>Returns True if the picture is visible in library, otherwise False . e.g. non-selected burst photos are not hidden but also not visible</p> <p>Returns True if the picture is in the trash ('Recently Deleted' folder), otherwise False</p> <p>Returns the date the photo was placed in the trash as a datetime.datetime object or None if photo is not in the trash</p> <p>Returns latitude and longitude as a tuple of floats (latitude, longitude). If location is not set, latitude and longitude are returned as None</p> <p>Returns a PlaceInfo object with reverse geolocation data or None if there is the photo has no reverse geolocation information.</p> <p>Returns True if photo is in a shared album, otherwise False.</p> <p><strong>Note</strong>: *Only valid on Photos 5 / MacOS 10.15+ on Photos <= 4, returns None instead of True/False.</p> <p>Returns list of CommentInfo objects for comments on shared photos or empty list if no comments.</p> <p><strong>Note</strong>: *Only valid on Photos 5 / MacOS 10.15+ on Photos <= 4, returns empty list.</p> <p>Returns list of LikeInfo objects for likes on shared photos or empty list if no likes.</p> <p><strong>Note</strong>: *Only valid on Photos 5 / MacOS 10.15+ on Photos <= 4, returns empty list.</p> <p>Returns True if the original image file is a referenced file (imported without copying to the Photos library) otherwise returns False .</p> <p>Returns True if type is photo/still image, otherwise False</p> <p>Returns True if type is movie/video, otherwise False</p> <p>Returns True if photo is a cloud asset, that is, it is in a library synched to iCloud. See also incloud</p> <p>Returns True if photo is a cloud asset and is synched to iCloud otherwise False if photo is a cloud asset and not yet synched to iCloud. Returns None if photo is not a cloud asset.</p> <p><strong>Note</strong>: Applies to master (original) photo only. It's possible for the master to be in iCloud but a local edited version is not yet synched to iCloud. incloud provides status of only the master photo. osxphotos does not yet provide a means to determine if the edited version is in iCloud. If you need this feature, please open an issue.</p> <p>Returns Uniform Type Identifier (UTI) for the current version of the image, for example: 'public.jpeg' or 'com.apple. quicktime-movie'. If the image has been edited, uti will return the UTI for the edited image, otherwise it will return the UTI for the original image.</p> <p>Returns Uniform Type Identifier (UTI) for the original unedited image, for example: 'public.jpeg' or 'com.apple.quicktime-movie'.</p> <p>Returns Uniform Type Identifier (UTI) for the edited image, for example: 'public.jpeg'. Returns None if the photo does not have adjustments.</p> <p>Returns Uniform Type Identifier (UTI) for the associated raw image, if there is one for example, 'com.canon.cr2-raw-image'. If the image is raw but not part of a RAW+JPEG pair, uti_raw returns None. In this case, use uti , or uti_original . See also has_raw and notes on Raw Photos.</p> <p>Returns True if photos is a burst image (e.g. part of a set of burst images), otherwise False. See burst_photos</p> <p>Returns True if photo is a burst photo and has been selected from the burst set by the user, otherwise False.</p> <p>Returns True if photo is a burst photo and is the key image for the burst set (the image that Photos shows on top of the burst stack), otherwise False.</p> <p>Returns True if photo is a burst image and is the photo that Photos selected as the default image for the burst set, otherwise False.</p> <p>If photo is a burst image (see burst), returns a list of PhotoInfo objects for all other photos in the same burst set. If not a burst image, returns empty list.</p> <p>Example below gets list of all photos that are bursts, selects one of of them and prints out the names of the other images in the burst set. PhotosDB.photos() will only return the photos in the burst set that the user selected using "Make a Selection. " in Photos or the key image Photos selected if the user has not yet made a selection. This is similar to how Photos displays and counts burst photos. Using burst_photos you can access the other images in the burst set to export them, etc.</p> <p>If photo is burst photo, returns list of albums it is contained in as well as any albums the key photo is contained in, otherwise returns PhotoInfo.albums .</p> <p>If a burst photo which has unselected burst images (e.g. the burst images are in the library but haven't been selected by the user using the "Make a selection" feature) is placed in a an album, Photos treats only the selected "key" photo as in the album. The unselected burst images, while associated with the photo in the album, are not technically in the album. If you are handling one of these unselected burst photos and want to know which album it would be in based on which albums it's selected key images are in, use burst_albums . See also burst_album_info and albums.</p> <p>If photo is non-selected burst photo, teturns a list of AlbumInfo objects representing the albums any other photos in the same burst set are contained in. Otherwise, returns PhotoInfo.album_info . See also burst_albums and album_info.</p> <p>Returns True if photo is an Apple live photo (ie. it has an associated "live" video component), otherwise returns False. See path_live_photo.</p> <p>Returns the path to the live video component of a live photo. If photo is not a live photo, returns None.</p> <p><strong>Note</strong>: will also return None if the live video component is missing on disk. It's possible that the original photo may be on disk (ismissing==False) but the video component is missing, likely because it has not been downloaded from iCloud.</p> <p>Returns True if photo was taken in iPhone portrait mode, otherwise False.</p> <p>Returns True if photo was taken in High Dynamic Range (HDR) mode, otherwise False.</p> <p>Returns True if photo is a selfie (taken with front-facing camera), otherwise False.</p> <p><strong>Note</strong>: Only implemented for Photos version 3.0+. On Photos version < 3.0, returns None.</p> <p>Returns True if photo is a time lapse video, otherwise False.</p> <p>Returns True if photo is a panorama, otherwise False.</p> <p><strong>Note</strong>: The result of PhotoInfo.panorama will differ from the "Panoramas" Media Types smart album in that it will also identify panorama photos from older phones that Photos does not recognize as panoramas.</p> <p>Returns True if photo is a slow motion video, otherwise False</p> <p>Returns image categorization labels associated with the photo as list of str.</p> <p><strong>Note</strong>: Only valid on Photos 5 on earlier versions, returns empty list. In Photos 5, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels_normalized.</p> <p>Returns image categorization labels associated with the photo as list of str. Labels are normalized (e.g. converted to lower case). Use of normalized strings makes it easier to search if you don't how Apple capitalizes a label. For example:</p> <p><strong>Note</strong>: Only valid on Photos 5+ on earlier versions, returns empty list. In Photos 5+, Photos runs machine learning image categorization against photos in the library and automatically assigns labels to photos such as "People", "Dog", "Water", etc. A photo may have zero or more labels associated with it. See also labels.</p> <p>Returns SearchInfo object that represents search metadata for the photo.</p> <p><strong>Note</strong>: Only valid on Photos 5+ on ealier versions, returns None.</p> <p>Returns SearchInfo object that represents normalized search metadata for the photo. This returns a SearchInfo object just as search_info but all the properties of the object return normalized text (converted to lowercase).</p> <p><strong>Note</strong>: Only valid on Photos 5+ on ealier versions, returns None.</p> <p>Returns an ExifInfo object with EXIF details from the Photos database. See ExifInfo for additional details.</p> <p><strong>Note</strong>: Only valid on Photos 5+ on earlier versions, returns None . The EXIF details returned are a subset of the actual EXIF data in a typical image. At import Photos stores this subset in the database and it's this stored data that exif_info returns.</p> <p>Returns an ExifToolCaching object for the photo which provides an interface to exiftool allowing you to read the actual EXIF data in the image file inside the Photos library. If exif_info doesn't give you all the data you need, you can use exiftool to read the entire EXIF contents of the image.</p> <p>If the file is missing from the library (e.g. not downloaded from iCloud), returns None.</p> <p>exiftool must be installed in the path for this to work. If exiftool cannot be found in the path, calling exiftool will log a warning and return None . You can check the exiftool path using osxphotos.exiftool.get_exiftool_path which will raise FileNotFoundError if exiftool cannot be found.</p> <p>ExifToolCaching provides the following methods:</p> <ul> <li>asdict(tag_groups=True) : returns all EXIF metadata found in the file as a dictionary in following form (Note: this shows just a subset of available metadata). See exiftool documentation to understand which metadata keys are available. If tag_groups is True (default) dict keys are in form "GROUP:TAG", e.g. "IPTC:Keywords". If tag_groups is False, dict keys do not have group names, e.g. "Keywords".</li></ul> <p>The ExifToolCaching class caches values read from the photo via exiftool and is read-only. This speeds access to the underlying EXIF data but any changes made to the EXIF data in the image will not be reflected in subsequent calls to exiftool . In practice, the images in the Photos Library should not be modified after import so this is unlikely to cause any issues.</p> <p><strong>Caution</strong>: I caution against writing new EXIF data to photos in the Photos library because this will overwrite the original copy of the photo and could adversely affect how Photos behaves. exiftool.asdict() is useful for getting access to all the photos information but if you want to write new EXIF data, I recommend you export the photo first then write the data. PhotoInfo.export() does this if called with exiftool=True .</p> <p>Returns a ScoreInfo data class object which provides access to the computed aesthetic scores for each photo.</p> <p><strong>Note</strong>: Valid only for Photos 5 returns None for earlier Photos versions.</p> <p>Returns list of PhotoInfo objects for <em>possible</em> duplicates or empty list if no matching duplicates. Photos are considered possible duplicates if the photo's original file size, date created, height, and width match another those of another photo. This does not do a byte-for-byte comparison or compute a hash which makes it fast and allows for identification of possible duplicates even if originals are not downloaded from iCloud. The signature-based approach should be robust enough to match duplicates created either through the "duplicate photo" menu item or imported twice into the library but you should not rely on this 100% for identification of all duplicates.</p> <p>Returns a JSON representation of all photo info.</p> <p>Returns a dictionary representation of all photo info.</p> <p>export(dest, *filename, edited=False, live_photo=False, export_as_hardlink=False, overwrite=False, increment=True, sidecar_json=False, sidecar_exiftool=False, sidecar_xmp=False, use_photos_export=False, timeout=120, exiftool=False, use_albums_as_keywords=False, use_persons_as_keywords=False)</p> <p>Export photo from the Photos library to another destination on disk.</p> <ul> <li>dest: must be valid destination path as str (or exception raised).</li> <li>*filename (optional): name of picture as str if not provided, will use current filename. <strong>NOTE</strong>: if provided, user must ensure file extension (suffix) is correct. For example, if photo is .CR2 file, edited image may be .jpeg. If you provide an extension different than what the actual file is, export will print a warning but will happily export the photo using the incorrect file extension. e.g. to get the extension of the edited photo, look at PhotoInfo.path_edited.</li> <li>edited: boolean if True (default=False), will export the edited version of the photo (or raise exception if no edited version)</li> <li>export_as_hardlink: boolean if True (default=False), will hardlink files instead of copying them</li> <li>overwrite: boolean if True (default=False), will overwrite files if they alreay exist</li> <li>live_photo: boolean if True (default=False), will also export the associted .mov for live photos exported live photo will be named filename.mov</li> <li>increment: boolean if True (default=True), will increment file name until a non-existent name is found</li> <li>sidecar_json: (boolean, default = False) if True will also write a json sidecar with metadata in format readable by exiftool sidecar filename will be dest/filename.json where filename is the stem of the photo name</li> <li>sidecar_json: (boolean, default = False) if True will also write a json sidecar with metadata in format readable by exiftool sidecar filename will be dest/filename.json where filename is the stem of the photo name resulting json file will include tag group names (e.g. exiftool -G -j )</li> <li>sidecar_exiftool: (boolean, default = False) if True will also write a json sidecar with metadata in format readable by exiftool sidecar filename will be dest/filename.json where filename is the stem of the photo name resulting json file will not include tag group names (e.g. exiftool -j )</li> <li>sidecar_xmp: (boolean, default = False) if True will also write a XMP sidecar with metadata sidecar filename will be dest/filename.xmp where filename is the stem of the photo name</li> <li>use_photos_export: boolean (default=False), if True will attempt to export photo via applescript interaction with Photos useful for forcing download of missing photos. This only works if the Photos library being used is the default library (last opened by Photos) as applescript will directly interact with whichever library Photos is currently using.</li> <li>timeout: (int, default=120) timeout in seconds used with use_photos_export</li> <li>exiftool: (boolean, default = False) if True, will use exiftool to write metadata directly to the exported photo exiftool must be installed and in the system path</li> <li>use_albums_as_keywords: (boolean, default = False) if True, will use album names as keywords when exporting metadata with exiftool or sidecar</li> <li>use_persons_as_keywords: (boolean, default = False) if True, will use person names as keywords when exporting metadata with exiftool or sidecar</li></ul> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1043902"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043902.js" async> </script> <!-- Composite End --> <!-- //MGID --> <p>Returns: list of paths to exported files. More than one file could be exported, for example if live_photo=True, both the original image and the associated .mov file will be exported</p> <p>The json sidecar file can be used by exiftool to apply the metadata from the json file to the image. For example:</p> <p>exiftool -j=photo_name.json photo_name.jpg</p> <p>If overwrite=False and increment=False, export will fail if destination file already exists</p> <p>render_template(template_str, none_str = "_", path_sep = None, expand_inplace = False, inplace_sep = None, filename=False, dirname=False, strip=False)</p> <p>Render template string for photo. none_str is used if template substitution results in None value and no default specified.</p> <ul> <li>template_str : str in osxphotos template language (OTL) format. See also Template System table. See notes below regarding specific details of the syntax.</li> <li>none_str : optional str to use as substitution when template value is None and no default specified in the template string. default is "_".</li> <li>path_sep : optional character to use as path separator when joining path like fields such as <folder_album> default is os.path.sep . May also be provided in the template itself. If provided both in the call to render_template() and in the template itself, the value in the template string takes precedence.</folder_album></li> <li>expand_inplace : expand multi-valued substitutions in-place as a single string instead of returning individual strings</li> <li>inplace_sep : optional string to use as separator between multi-valued keywords with expand_inplace default is ','</li> <li>filename : if True, template output will be sanitized to produce valid file name</li> <li>dirname : if True, template output will be sanitized to produce valid directory name</li> <li>strip : if True, leading/trailign whitespace will be stripped from rendered template strings</li></ul> <p>Returns a tuple of (rendered, unmatched) where rendered is a list of rendered strings with all substitutions made and unmatched is a list of any strings that resembled a template substitution but did not match a known substitution. E.g. if template contained "<foo>", unmatched would be ["foo"]. If there are unmatched strings, rendered will be []. E.g. a template statement must fully match or will result in error and return all unmatched fields in unmatched.<p> <p>e.g. render_template("<created.year>/<foo>", photo) would return ([],["foo"])<p> <p>Some substitutions, notably album , keyword , and person could return multiple values, hence a new string will be return for each possible substitution (hence why a list of rendered strings is returned). For example, a photo in 2 albums: 'Vacation' and 'Family' would result in the following rendered values if template was "<created.year>/<album>" and created.year == 2020: ["2020/Vacation","2020/Family"]<p> <p>See Template System for additional details.</p> <p>PhotosInfo.exif_info returns an ExifInfo object with some EXIF data about the photo (Photos 5 only). ExifInfo contains the following properties:</p> <p>PhotosDB.album_info and PhotoInfo.album_info return a list of AlbumInfo objects. Each AlbumInfo object represents a single album in the Photos library.</p> <p>Returns the universally unique identifier (uuid) of the album. This is how Photos keeps track of individual objects within the database.</p> <p>Returns the title or name of the album.</p> <p>Returns a list of PhotoInfo objects representing each photo contained in the album sorted in the same order as in Photos. (e.g. if photos were manually sorted in the Photos albums, photos returned by photos will be in same order as they appear in the Photos album)</p> <p>Returns the creation date as a timezone aware datetime.datetime object of the album.</p> <p>Returns the date of earliest photo in the album as a timezone aware datetime.datetime object.</p> <p>Returns the date of latest photo in the album as a timezone aware datetime.datetime object.</p> <p>Returns a hierarchical list of FolderInfo objects representing the folders the album is contained in. For example, if album "AlbumInFolder" is in SubFolder2 of Folder1 as illustrated below, would return a list of FolderInfo objects representing ["Folder1", "SubFolder2"]</p> <p>Returns a hierarchical list of names of the folders the album is contained in. For example, if album is in SubFolder2 of Folder1 as illustrated below, would return ["Folder1", "SubFolder2"].</p> <p>Returns a FolderInfo object representing the albums parent folder or None if album is not a in a folder.</p> <p>PhotosDB.import_info returns a list of ImportInfo objects. Each ImportInfo object represents an import session in the library. PhotoInfo.import_info returns a single ImportInfo object representing the import session for the photo (or None if no associated import session).</p> <p><strong>Note</strong>: Photos 5+ only. Not implemented for Photos version <= 4.</p> <p>Returns the universally unique identifier (uuid) of the import session. This is how Photos keeps track of individual objects within the database.</p> <p>Returns a list of PhotoInfo objects representing each photo contained in the import session.</p> <p>Returns the creation date as a timezone aware datetime.datetime object of the import session.</p> <p>Returns the start date as a timezone aware datetime.datetime object for when the import session bega.</p> <p>Returns the end date as a timezone aware datetime.datetime object for when the import session completed.</p> <p>PhotosDB.folder_info returns a list of FolderInfo objects representing the top level folders in the library. Each FolderInfo object represents a single folder in the Photos library.</p> <p>Returns the universally unique identifier (uuid) of the folder. This is how Photos keeps track of individual objects within the database.</p> <p>Returns the title or name of the folder.</p> <p>Returns a list of AlbumInfo objects representing each album contained in the folder.</p> <p>Returns a list of AlbumInfo objects for each shared album in the photos database.</p> <p><strong>Note</strong>: Only valid for Photos 5+ on Photos <= 4, prints warning and returns empty list.</p> <p>Returns a list of FolderInfo objects representing the sub-folders of the folder.</p> <p>Returns a FolderInfo object representing the folder's parent folder or None if album is not a in a folder.</p> <p><strong>Note</strong>: FolderInfo and AlbumInfo objects effectively work as a linked list. The children of a folder are contained in subfolders and album_info and the parent object of both AlbumInfo and FolderInfo is represented by parent . For example:</p> <p>PhotoInfo.place returns a PlaceInfo object if the photo contains valid reverse geolocation information. PlaceInfo has the following properties.</p> <p><strong>Note</strong> For Photos versions <= 4, only name , names , and country_code properties are defined. All others return None . This is because older versions of Photos do not store the more detailed reverse geolocation information.</p> <p>Returns True if photo place is user's home address, otherwise False .</p> <p>Returns the name of the local place as str. This is what Photos displays in the Info window. <strong>Note</strong> Photos 5 uses a different algorithm to determine the name than earlier versions which means the same Photo may have a different place name in Photos 4 and Photos 5. PhotoInfo.name will return the name Photos would have shown depending on the version of the library being processed. In Photos 5, the place name is generally more detailed than in earlier versions of Photos.</p> <p>For example, I have photo in my library that under Photos 4, has place name of "‎⁨Mayfair Shopping Centre⁩, ⁨Victoria⁩, ⁨Canada⁩" and under Photos 5 the same photo has place name of "Mayfair⁩, ⁨Vancouver Island⁩, ⁨Victoria⁩, ⁨British Columbia⁩, ⁨Canada⁩".</p> <p>Returns None if photo does not contain a name.</p> <p>Returns a PlaceNames namedtuple with the following fields. Each field is a list with zero or more values, sorted by area in ascending order. E.g. names.area_of_interest could be ['Gulf Islands National Seashore', 'Santa Rosa Island'], ["Knott's Berry Farm"], or [] if area_of_interest not defined. The value shown in Photos is the first value in the list. With the exception of body_of_water each of these field corresponds to an attribute of a CLPlacemark object. <strong>Note</strong> The PlaceNames namedtuple contains reserved fields not listed below (see implementation for details), thus it should be referenced only by name (e.g. names.city ) and not by index.</p> <ul> <li>country the name of the country associated with the placemark.</li> <li>state_province administrativeArea, The state or province associated with the placemark.</li> <li>sub_administrative_area additional administrative area information for the placemark.</li> <li>city locality the city associated with the placemark.</li> <li>additional_city_info subLocality, Additional city-level information for the placemark.</li> <li>ocean the name of the ocean associated with the placemark.</li> <li>area_of_interest areasOfInterest, The relevant areas of interest associated with the placemark.</li> <li>inland_water the name of the inland water body associated with the placemark.</li> <li>region the geographic region associated with the placemark.</li> <li>sub_throughfare additional street-level information for the placemark.</li> <li>postal_code the postal code associated with the placemark.</li> <li>street_address throughfare, The street address associated with the placemark.</li> <li>body_of_water in Photos 4, any body of water in Photos 5 contains the union of ocean and inland_water</li></ul> <p><strong>Note</strong>: In Photos <= 4.0, only the following fields are defined all others are set to empty list:</p> <ul> <li>country</li> <li>state_province</li> <li>sub_administrative_area</li> <li>city</li> <li>additional_city_info</li> <li>area_of_interest</li> <li>body_of_water</li></ul> <p>Returns the country_code of place, for example "GB". Returns None if PhotoInfo contains no country code.</p> <p>Returns the full postal address as a string if defined, otherwise None .</p> <p>For example: "2038 18th St NW, Washington, DC 20009, United States"</p> <p>Returns a PostalAddress namedtuple with details of the postal address containing the following fields:</p> <ul> <li>city</li> <li>country</li> <li>postal_code</li> <li>state</li> <li>street</li> <li>sub_administrative_area</li> <li>sub_locality</li> <li>iso_country_code</li></ul> <p>PhotoInfo.score returns a ScoreInfo object that exposes the computed aesthetic scores for each photo (<strong>Photos 5+ only</strong>). I have not yet reverse engineered the meaning of each score. The overall score seems to the most useful and appears to be a composite of the other scores. The following score properties are currently available:</p> <p>Example: find your "best" photo of food</p> <p>PhotoInfo.search_info and PhotoInfo.search_info_normalized return a SearchInfo object that exposes various metadata that Photos uses when searching for photos such as labels, associated holiday, etc. (<strong>Photos 5+ only</strong>).</p> <p>The following properties are available:</p> <p>Returns list of labels applied to photo by Photos image categorization algorithms.</p> <p>Returns list of place names associated with the photo.</p> <p>Returns list of street names associated with the photo. (e.g. reverse geolocation of where the photo was taken)</p> <p>Returns list of neighborhood names associated with the photo.</p> <p>Returns list of locality names associated with the photo.</p> <p>Returns str of city/town/municipality associated with the photo.</p> <p>Returns str of state name associated with the photo.</p> <p>Returns str of state abbreviation associated with the photo.</p> <p>Returns str of country name associated with the photo.</p> <p>Returns str of month name associated witht the photo (e.g. month in which the photo was taken)</p> <p>Returns year associated with the photo.</p> <p>Returns list of bodies of water associated with the photo.</p> <p>Returns list of holiday names associated with the photo.</p> <p>Returns list of activities associated with the photo.</p> <p>Returns str of season name associated with the photo.</p> <p>Returns list of venue names associated with the photo.</p> <p>Returns list of venue types associated with the photoo.</p> <p>Returns list of media types associated with the photo.</p> <p>Returns all search_info properties as a single list of strings.</p> <p>Returns all associated search_info metadata as a dict.</p> <p>PhotosDB.person_info and PhotoInfo.person_info return a list of PersonInfo objects represents persons in the database and in a photo, respectively. The PersonInfo class has the following properties and methods.</p> <p>Returns the full name of the person represented in the photo. For example, "Maria Smith".</p> <p>Returns the display name of the person represented in the photo. For example, "Maria".</p> <p>Returns the UUID of the person as stored in the Photos library database.</p> <p>Returns a PhotoInfo instance for the photo designated as the key photo for the person. This is the Photos uses to display the person's face thumbnail in Photos' "People" view.</p> <p>Returns a count of how many times this person appears in images in the database.</p> <p>Returns a list of PhotoInfo objects representing all photos the person appears in.</p> <p>Returns a list of FaceInfo objects associated with this person sorted by quality score. Highest quality face is result[0] and lowest quality face is result[n].</p> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1043902"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043902.js" async> </script> <!-- Composite End --> <!-- //MGID --> <p>Returns a json string representation of the PersonInfo instance.</p> <p>Returns a dictionary representation of the PersonInfo instance.</p> <p>PhotoInfo.face_info return a list of FaceInfo objects representing detected faces in a photo. The FaceInfo class has the following properties and methods.</p> <p>Full name of the person represented by the face or None if person hasn't been given a name in Photos. This is a shortcut for FaceInfo.person_info.name .</p> <p>UUID of the photo this face is associated with.</p> <p>PersonInfo object associated with this face.</p> <p>PhotoInfo object representing the photo that contains this face.</p> <p>Returns named tuple with following coordinates as used in Metdata Working Group (mwg) face regions in XMP files.</p> <p>Returnes named tuple with following coordinates as used in Microsoft Photo Region Rectangle (mpri) in XMP files.</p> <ul> <li>x = x coordinate of top left corner of rectangle</li> <li>y = y coordinate of top left corner of rectangle</li> <li>h = height of rectangle</li> <li>w = width of rectangle</li></ul> <p>Returns list of x, y coordinates as tuples [(x0, y0), (x1, y1)] representing the corners of rectangular region that contains the face. Coordinates are in same format and reference frame as used by Pillow imaging library. <strong>Note</strong>: face_rect() and all other properties/methods that return coordinates refer to the <em>current version</em> of the image. E.g. if the image has been edited ( PhotoInfo.hasadjustments ), these refer to PhotoInfo.path_edited . If the image has no adjustments, these coordinates refer to the original photo ( PhotoInfo.path ).</p> <p>Coordinates as (x, y) tuple for the center of the detected face.</p> <p>Coordinates as (x, y) tuple for the mouth of the detected face.</p> <p>Coordinates as (x, y) tuple for the left eye of the detected face.</p> <p>Coordinates as (x, y) tuple for the right eye of the detected face.</p> <p>Diameter of detected face region in pixels.</p> <p>Roll, pitch, and yaw of face region in radians. Returns a tuple of (roll, pitch, yaw)</p> <p>Roll of face region in radians.</p> <p>Pitch of face region in radians.</p> <p>Yaw of face region in radians.</p> <p>The following additional properties are also available but are not yet fully documented.</p> <ul> <li>center_x : x coordinate of center of face in Photos' internal reference frame</li> <li>center_y : y coordinate of center of face in Photos' internal reference frame</li> <li>mouth_x : x coordinate of mouth in Photos' internal reference frame</li> <li>mouth_y : y coordinate of mouth in Photos' internal reference frame</li> <li>left_eye_x : x coordinate of left eye in Photos' internal reference frame</li> <li>left_eye_y : y coordinate of left eye in Photos' internal reference frame</li> <li>right_eye_x : x coordinate of right eye in Photos' internal reference frame</li> <li>right_eye_y : y coordinate of right eye in Photos' internal reference frame</li> <li>size : size of face region in Photos' internal reference frame</li> <li>quality : quality measure of detected face</li> <li>source_width : width in pixels of photo</li> <li>source_height : height in pixels of photo</li> <li>has_smile :</li> <li>left_eye_closed :</li> <li>right_eye_closed :</li> <li>manual :</li> <li>face_type :</li> <li>age_type :</li> <li>bald_type :</li> <li>eye_makeup_type :</li> <li>eye_state :</li> <li>facial_hair_type :</li> <li>gender_type :</li> <li>glasses_type :</li> <li>hair_color_type :</li> <li>lip_makeup_type :</li> <li>smile_type :</li></ul> <p>Returns a dictionary representation of the FaceInfo instance.</p> <p>Returns a JSON representation of the FaceInfo instance.</p> <p>PhotoInfo.comments returns a list of CommentInfo objects for comments on shared photos. (Photos 5/MacOS 10.15+ only). The list of CommentInfo objects will be sorted in ascending order by date comment was made. CommentInfo contains the following fields:</p> <ul> <li>datetime : datetime.datetime , date/time comment was made</li> <li>user : str , name of user who made the comment</li> <li>ismine : bool , True if comment was made by person who owns the Photos library being operated on</li> <li>text : str , text of the actual comment</li></ul> <p>PhotoInfo.likes returns a list of LikeInfo objects for "likes" on shared photos. (Photos 5/MacOS 10.15+ only). The list of LikeInfo objects will be sorted in ascending order by date like was made. LikeInfo contains the following fields:</p> <ul> <li>datetime : datetime.datetime , date/time like was made</li> <li>user : str , name of user who made the like</li> <li>ismine : bool , True if like was made by person who owns the Photos library being operated on</li></ul> <p>PhotoInfo.adjustments returns an AdjustmentsInfo object, if the photo has adjustments, or None if the photo does not have adjusments. AdjustmentsInfo has the following properties and methods:</p> <ul> <li>plist : The adjustments plist file maintained by Photos as a dict.</li> <li>data : The raw, undecoded adjustments info as binary blob.</li> <li>editor : The editor bundle ID of the app which made the edits, e.g. com.apple.photos .</li> <li>format_id : The format identifier set by the app which made the edits, e.g. com.apple.photos .</li> <li>base_version : Version info set by the app which made the edits.</li> <li>format_version : Version info set by the app which made the edits.</li> <li>timestamp : Time stamp of the adjustment as a timezone-aware datetime.datetime object None if no timestamp is set.</li> <li>adjustments : a list of dicts containing information about the decoded adjustments to the photo or None if adjustments could not be decoded. AdjustmentsInfo can decode adjustments made by Photos but cannot decode adjustments made by external plugins or apps.</li> <li>adj_metadata : a dict containing additional data about the photo decoded from the adjustment data.</li> <li>adj_orientation : the EXIF orientation of the edited photo decoded from the adjustment metadata.</li> <li>adj_format_version : version for adjustments format decoded from the adjustment data.</li> <li>adj_version_info : version info for the application which made the adjustments to the photo decoded from the adjustments data.</li> <li>asdict() : dict representation of the AdjustmentsInfo object contains all properties with exception of plist .</li></ul> <p>Handling raw photos in osxphotos requires a bit of extra work. Raw photos in Photos can be imported in two different ways: 1) a single raw photo with no associated JPEG image is imported 2) a raw+JPEG pair is imported -- two separate images with same file stem (e.g. IMG_0001.CR2 and IMG_001.JPG ) are imported.</p> <p>The latter are treated by Photos as a single image. By default, Photos will treat these as a JPEG image. They are denoted in the Photos interface with a "J" icon superimposed on the image. In Photos, the user can select "Use RAW as original" in which case the "J" icon changes to an "R" icon and all subsequent edits will use the raw image as the original. To further complicate this, different versions of Photos handle these differently in their internal logic.</p> <p>osxphotos attempts to simplify the handling of these raw+JPEG pairs by providing a set of attributes for accessing both the JPEG and the raw version. For example, PhotoInfo.has_raw will be True if the photo has an associated raw image but False otherwise and PhotoInfo.path_raw provides the path to the associated raw image. Reference the following table for the various attributes useful for dealing with raw images. Given the different ways Photos deals with raw images I've struggled with how to represent these in a logical and consistent manner. If you have suggestions for a better interface, please open an issue!</p> <table> <thead> <tr> <th>PhotoInfo attribute</th> <th>IMG_0001.CR2 imported without raw+JPEG pair</th> <th>IMG_0001.CR2 + IMG_0001.JPG raw+JPEG pair, JPEG is original</th> <th>IMG_0001.CR2 + IMG_0001.JPG raw+jpeg pair, raw is original</th></tr> <tbody> <tr><td>israw</td> <td>True</td> <td>False</td> <td>False</td></tr> <tr><td>has_raw</td> <td>False</td> <td>True</td> <td>True</td></tr> <tr><td>uti</td> <td>com.canon.cr2-raw-image</td> <td>public.jpeg</td> <td>public.jpeg</td></tr> <tr><td>uti_raw</td> <td>None</td> <td>com.canon.cr2-raw-image</td> <td>com.canon.cr2-raw-image</td></tr> <tr><td>raw_original</td> <td>False</td> <td>False</td> <td>True</td></tr> <tr><td>path</td> <td>/path/to/IMG_0001.CR2</td> <td>/path/to/IMG_0001.JPG</td> <td>/path/to/IMG_0001.JPG</td></tr> <tr><td>path_raw</td> <td>None</td> <td>/path/to/IMG_0001.CR2</td> <td>/path/to/IMG_0001.CR2</td></tr></tbody></thead></table> <p>To get the path of every raw photo, whether it's a single raw photo or a raw+JPEG pair, one could do something like this:</p> <p>The templating system converts one or template statements, written in osxphotos templating language, to one or more rendered values using information from the photo being processed.</p> <p>In its simplest form, a template statement has the form: "<template_field>" , for example "<title>" which would resolve to the title of the photo.<p> <p>Template statements may contain one or more modifiers. The full syntax is:</p> <p>Template statements are white-space sensitive meaning that white space (spaces, tabs) changes the meaning of the template statement.</p> <p>pretext and posttext are free form text. For example, if a photo has title "My Photo Title". the template statement "The title of the photo is " , resolves to "The title of the photo is My Photo Title" . The pretext in this example is "The title if the photo is " and the template_field is .<p> <p>delim : optional delimiter string to use when expanding multi-valued template values in-place</p> <p>+ : If present before template name , expands the template in place. If delim not provided, values are joined with no delimiter.</p> <p>e.g. if Photo keywords are ["foo","bar"] :</p> <ul> <li>"<keyword>" renders to "foo", "bar"</keyword></li> <li>"<,+keyword>" renders to: "foo,bar"</li> <li>"< +keyword>" renders to: "foo bar"</li> <li>"<+keyword>" renders to "foobar"</li></ul> <p>template_field : The template field to resolve. See Template Substitutions for full list of template fields.</p> <p>:subfield : Some templates have sub-fields, For example, <exiftool:iptc:make> the template_field is exiftool and the sub-field is IPTC:Make .<p> <p>|filter : You may optionally append one or more filter commands to the end of the template field using the vertical pipe ('|') symbol. Filters may be combined, separated by '|' as in: <keyword|capitalize|parens>.<p> <ul> <li>lower: Convert value to lower case, e.g. 'Value' => 'value'.</li> <li>upper: Convert value to upper case, e.g. 'Value' => 'VALUE'.</li> <li>strip: Strip whitespace from beginning/end of value, e.g. ' Value ' => 'Value'.</li> <li>titlecase: Convert value to title case, e.g. 'my value' => 'My Value'.</li> <li>capitalize: Capitalize first word of value and convert other words to lower case, e.g. 'MY VALUE' => 'My value'.</li> <li>braces: Enclose value in curly braces, e.g. 'value => '<value>'.</value></li> <li>parens: Enclose value in parentheses, e.g. 'value' => '(value')</li> <li>brackets: Enclose value in brackets, e.g. 'value' => '[value]'</li> <li>shell_quote: Quotes the value for safe usage in the shell, e.g. My file.jpeg => 'My file.jpeg' only adds quotes if needed.</li> <li>function: Run custom python function to filter value use in format 'function:/path/to/file.py::function_name'. See example at https://github.com/RhetTbull/osxphotos/blob/master/examples/template_filter.py</li></ul> <p>e.g. if Photo keywords are ["FOO","bar"] :</p> <ul> <li>"<keyword|lower>" renders to "foo", "bar"</keyword|lower></li> <li>"<keyword|upper>" renders to: "FOO", "BAR"</keyword|upper></li> <li>"<keyword|capitalize>" renders to: "Foo", "Bar"</keyword|capitalize></li> <li>"<keyword|lower|parens>" renders to: "(foo)", "(bar)"</keyword|lower|parens></li></ul> <p>e.g. if Photo description is "my description":</p> <p>(path_sep) : optional path separator to use when joining path-like fields, for example <folder_album>. Default is "/".<p> <p>e.g. If Photo is in Album1 in Folder1 :</p> <ul> <li>"<folder_album>" renders to ["Folder1/Album1"]</folder_album></li> <li>"<folder_album(>)>" renders to ["Folder1>Album1"]</folder_album(>)></li> <li>"<folder_album()>" renders to ["Folder1Album1"]</folder_album()></li></ul> <p>[find,replace] : optional text replacement to perform on rendered template value. For example, to replace "/" in an album name, you could use the template "<album[ ,-]="">" . Multiple replacements can be made by appending "|" and adding another find|replace pair. e.g. to replace both "/" and ":" in album name: "<album[ ,-|:,-]="">" . find/replace pairs are not limited to single characters. The "|" character cannot be used in a find/replace pair.<p> <p>conditional : optional conditional expression that is evaluated as boolean (True/False) for use with the ?bool_value modifier. Conditional expressions take the form ' not operator value ' where not is an optional modifier that negates the operator . Note: the space before the conditional expression is required if you use a conditional expression. Valid comparison operators are:</p> <ul> <li>contains : template field contains value, similar to python's in</li> <li>matches : template field contains exactly value, unlike contains : does not match partial matches</li> <li>startswith : template field starts with value</li> <li>endswith : template field ends with value</li> <li><= : template field is less than or equal to value</li> <li>>= : template field is greater than or equal to value</li> <li>< : template field is less than value</li> <li>> : template field is greater than value</li> <li>== : template field equals value</li> <li>!= : template field does not equal value</li></ul> <p>The value part of the conditional expression is treated as a bare (unquoted) word/phrase. Multiple values may be separated by '|' (the pipe symbol). value is itself a template statement so you can use one or more template fields in value which will be resolved before the comparison occurs.</p> <ul> <li><keyword matches="" beach="">resolves to True if 'Beach' is a keyword. It would not match keyword 'BeachDay'.</keyword></li> <li><keyword contains="" beach="">resolves to True if any keyword contains the word 'Beach' so it would match both 'Beach' and 'BeachDay'.</keyword></li> <li><photo.score.overall >="" 0.7="">resolves to True if the photo's overall aesthetic score is greater than 0.7.</photo.score.overall></li> <li><keyword|lower contains="" beach="">uses the lower case filter to do case-insensitive matching to match any keyword that contains the word 'beach'.</keyword|lower></li> <li><keyword|lower not="" contains="" beach="">uses the not modifier to negate the comparison so this resolves to True if there is no keyword that matches 'beach'.</keyword|lower></li></ul> <p>Examples: to export photos that contain certain keywords with the osxphotos export command's --directory option:</p> <p>This exports any photo that has keywords 'travel' or 'vacation' into a directory 'Travel-Photos' and all other photos into directory 'Not-Travel-Photos'.</p> <p>This can be used to rename files as well, for example: --filename "<><original_name>,<original_name>>"<p> <p>This renames any photo that is a favorite as 'Favorite-ImageName.jpg' (where 'ImageName.jpg' is the original name of the photo) and all other photos with the unmodified original name.</p> <p>?bool_value : Template fields may be evaluated as boolean (True/False) by appending "?" after the field name (and following "(path_sep)" or "[find/replace]". If a field is True (e.g. photo is HDR and field is "<hdr>" ) or has any value, the value following the "?" will be used to render the template instead of the actual field value. If the template field evaluates to False (e.g. in above example, photo is not HDR) or has no value (e.g. photo has no title and field is "<title>" ) then the default value following a "," will be used.<p> <p>e.g. if photo is an HDR image,</p> <p>and if it is not an HDR image,</p> <p>,default : optional default value to use if the template name has no value. This modifier is also used for the value if False for boolean-type fields (see above) as well as to hold a sub-template for values like <created.strftime>. If no default value provided, "_" is used.<p> <p>e.g., if photo has no title set,</p> <p>Template fields such as created.strftime use the default value to pass the template to use for strftime .</p> <p>e.g., if photo date is 4 February 2020, 19:07:38,</p> <p>Some template fields such as "<media_type>" use the default value to allow customization of the output. For example, "<media_type>" resolves to the special media type of the photo such as panorama or selfie . You may use the default value to override these in form: "<media_type,video=vidéotime_lapse=vidéo_accélérée>" . In this example, if photo was a time_lapse photo, media_type would resolve to vidéo_accélérée instead of time_lapse .<p> <p>Either or both bool_value or default (False value) may be empty which would result in empty string "" when rendered.</p> <p>If you want to include "<" or ">" in the output, use "<openbrace>" or "<closebrace>" template substitution.<p> <p>The following template field substitutions are availabe for use the templating system.</p> <br> <h2>Contact Us</h2> <p>If you have questions, suggestions, or comments about ERDDAP in general (not this specific <br>ERDDAP installation or its datasets), please send an email to <tt>bob dot simons at noaa dot gov</tt> <br>and include the ERDDAP URL directly related to your question or comment. <br>Or, you can join the ERDDAP Google Group / Mailing List by visiting <br>https://groups.google.com/forum/#!forum/erddap<img loading="lazy" src="//geologyidea.com/img/giss-2022/6480/image_Lg7mDQuZyly8B7pSCaa9bW0.png"> and clicking on "Apply for membership". <br>Once you are a member, you can post your question there or search to see if the question <br>has already been asked and answered.</p> <br> <h2>20.7 Using the Applications Hierarchy Component to Develop Applications</h2> <p>Now that you have worked with tree structures, trees, and tree versions, you can start developing applications in JDeveloper using the Applications Hierarchy component.</p> <p>The Applications Hierarchy component is denoted by the fnd:hierarchy tag and contains two facets: hierarchy and toolbar . The hierarchy facet holds the af:tree or af:treeTable the toolbar facet can hold action buttons used with items within the tree or treeTable .</p> <p>The following picture shows an example of the Applications Hierarchy component in JDeveloper.</p> <p>Figure 20-67 Applications Hierarchy Component</p> <p>You can add any JSF or ADF Faces component to these facets, even with the generated af:tree or af:treeTable. The fnd:hierarchy tag supports the TreeCode and TreeVersionId properties to display specific trees or tree versions.</p> <p>You can create two types of Hierarchy applications: Tree and Tree Table.</p> <h3>20.7.1 How to Create a Tree Application</h3> <p>The following section explains how to create a tree application using the Applications Hierarchy component.</p> <p>Create an application initialized for use with Oracle Middleware Extensions for Applications. For more information, see Chapter 2, "Setting Up Your Development Environment."</p> <p>To create a Tree application:</p> <p>Create a new JSF/JSPX page.</p> <p>From the ADF Faces page in the Component Palette, select Applications .</p> <p>From the Applications page in the Component Palette, select Hierarchy and drag it to your .jspx file's visual editor.</p> <p>The Initialize Applications Connection window opens:</p> <p>Figure 20-68 Initialize Applications Connection Window (1)</p> <p>Choose a connection from the dropdown menu and click OK .</p> <p>If there is no existing connection, click Add to create a new one.</p> <p>A second Initialize Applications Connection window opens.</p> <p>Figure 20-69 Initialize Applications Connection Window (2)</p> <p>Choose a tree structure from the dropdown list.</p> <p>Select Read-only if you want the application to be read only.</p> <p>The tree appears in the visual editor.</p> <p>Figure 20-70 Visual Editor with Tree</p> <p>Run the .jspx file from the Application Navigator.</p> <p>Run the .jspx file from the visual editor.</p> <p>A browser window opens and the application runs.</p> <p>Figure 20-71 Example of Tree Application Style</p> <h3>20.7.2 How to Create a Tree Table Application</h3> <p>The following section explains how to create a tree table application using the applications Hierarchy component.</p> <p>Create an application initialized for use with Oracle Middleware Extensions for Applications. For more information, see Chapter 2, "Setting Up Your Development Environment."</p> <p>To create a Tree Table application:</p> <p>The Initialize Applications Connection window redisplays with additional fields.</p> <p>Figure 20-72 Initialize Applications Connection Window (3)</p> <p>Select Read-only if you want the application to be read only.</p> <p>Select the available attributes to display at each tree level.</p> <p>The tree table appears in the visual editor.</p> <p>Figure 20-73 Visual Editor with Tree Table</p> <p>Run the .jspx from either the Application Navigator or the visual editor.</p> <p>A browser window opens and the application runs.</p> <p>Figure 20-74 Example of Tree Table Application Style</p> <h3>20.7.3 How to Sort Hierarchies</h3> <p>The Sort option allows you to sort tree-node hierarchies in ascending or descending order, and is enabled by default.</p> <p>Select Ascending or Descending .</p> <p>Figure 20-75 Sorting Hierarchies</p> <p><img loading="lazy" src="//geologyidea.com/img/giss-2022/6480/image_z4tiJn8ekslo.png"></p> <p> <br>Description of "Figure 20-75 Sorting Hierarchies"</p> <br> <h2>Final thoughts</h2> <p>In this article, we discussed and implemented various exploratory data analysis methods for text data. Some common, some lesser-known but all of them could be a great addition to your data exploration toolkit.</p> <p>Hopefully, you will find some of them useful in your current and future projects.</p> <p>To make data exploration even easier, I have created a <strong>“Exploratory Data Analysis for Natural Language Processing Template”</strong> that you can use for your work.</p> <p>Also, as you may have seen already, <strong>for every chart in this article, there is a code snippet</strong> that creates it. Just click on the button below a chart.</p> <p><img loading="lazy" src="//geologyidea.com/img/giss-2022/6480/image_HajsluJkC7hg5HpdJJ131.png"></p> <h3>Shahul ES</h3> <p><strong>Freelance Data Scientist | Kaggle Master</strong> <br>Data science professional with a strong end to end data science/machine learning and deep learning (NLP) skills. Experienced working in a Data Science/ML Engineer role in multiple startups. Kaggle Kernels Master ranked the top 20 among 100,000+ users.</p> <br> <h2>Conclusion</h2> <p>Volatile data continues to give insight to computerized devices even when users of those devices attempt to hide or modify the stored data. The life span of this data remains short and needs to be captured as soon as possible. In this research, the com.apple.geod application was examined which stores map cache data for a short period. This data reveals pieces of satellite imagery when viewing Apple’s own map application, Apple Maps, and location information hidden with the binary data inside the MapTitles.sqlitedb file. Yelp, a business review application, also stores cache data in the same location as Apple Maps.</p> <p>Further research may reveal the connection between these applications and the application data and how long these applications store data within the cache. Deletion of applications may leave traces behind which was the case with Yelp, but other applications would need to be reviewed to see if the same observation is held.</p> <center> <div class="addthis_inline_share_toolbox"></div> <br> <!-- MGID --> <!-- Composite Start --> <div id="M657953ScriptRootC1038348"> </div> <script>var s1= document.location.host;</script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1038348.js" async></script> <!-- Composite End --> <!-- //MGID --> <h2>Watch the video: Python in ArcGIS. Урок 1. arcpy: введение</h2> <iframe class="g-youtube" src="https://www.youtube.com/embed/u320Z6SCxdc" frameborder="0" allowfullscreen></iframe> <div class="ag-box"><center> <center> <!-- MGID <center><div id="M657953ScriptRootC1043903"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043903.js" async> </script> //MGID--> </center> </center></div> </center> </div> </article> <!-- ================= /Full Post ================= --> <!-- =============== Blog Pagination =============== --> <br><br> <nav class="blog-pagination"> <ul class="justify-content-between pagination"> <li class="page-item newer-post pl-15"><a class="page-link border-0 hvr-icon-back" href="/8025-what-is-the-dnsc08-mean-sea-surface-model-ellipsoid-b.html">Previous Article</a></li> <li class="page-item older-post pr-15"><a class="page-link border-0 hvr-icon-forward" href="/20163-73-assignment-igneous-rock-lab-geosciences.html">Next Article</a></li> </ul> </nav> <!-- //Pagination --> <!-- ================= Comment Area ================= --> <div class="comments-area"> <div class="comments-title"> </div> </div> <!-- ================= //Comment Area ================= --> </main> <!-- ====================== //Main .blog-area ====================== --> <!-- ====================== Aside .middle-sidebar ====================== --> <aside class="col-xl-3 col-lg-4 col-md-5 middle-sidebar ml-xl-auto pl-lg-0 pl-md-0 mt-sm-5 mt-lg-0"> <div class="row"> <!-- MGID--> <center><div id="M657953ScriptRootC1043903"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043903.js" async> </script> <!-- //MGID--> </center> <div class="col-xl-12 col-md-11 col-sm-6 ml-lg-auto ml-md-auto sidebar-news-letter sidebar-widget pl-xl-0"> <p class="widget-title" style="font-size:18px !important; font-weight: bold !important; opacity: 1.0 !important;">Contact Us</p> <!-- New Letter--> <div class="card news-letter border-0 rounded-0 p-15"> <div class="card-body p-0"> <p class="card-text"></p> <form class="form-inline" action="#" method="get"> <input type="text" placeholder="email@domain.com" value=""> <button type="submit"><i class="fa fa-envelope"></i></button> </form> </div> </div> </div> <center> <center> <!-- MGID <center><div id="M657953ScriptRootC1043903"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043903.js" async> </script> //MGID--> </center> </center> <!-- Sidebar Widget, Sidebar Popular Post --> <div class="col-xl-12 col-md-11 col-sm-6 ml-lg-auto ml-md-auto sidebar-popular-post sidebar-widget pl-xl-0"> <p class="widget-title" style="font-size:18px !important; font-weight: bold !important; opacity: 1.0 !important;">Popular Posts</p> <!-- Popular Post --> <div class="popular-post p-15"> <ul> <li> <a href="/18298-reprojecting-points-shapes-and-rasters-using-qgis.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/big/18298/en-reprojecting-points-shapes-and-rasters-using-qgis.jpg" alt="Reprojecting Points, Shapes and Rasters using QGIS?"> <div class="post-info"> <h3>Reprojecting Points, Shapes and Rasters using QGIS?</h3> </div> </a> </li><li> <a href="/710-greenland-maps.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/greenland-maps.jpg" alt="Greenland Maps"> <div class="post-info"> <h3>Greenland Maps</h3> </div> </a> </li><li> <a href="/11504-creating-ids-for-multiple-features-in-python-parser-o.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/big/11504/en-creating-ids-for-multiple-features-in-python-parser-o.jpg" alt="Creating IDs for multiple features in Python Parser of ArcGIS Field Calculator?"> <div class="post-info"> <h3>Creating IDs for multiple features in Python Parser of ArcGIS Field Calculator?</h3> </div> </a> </li><li> <a href="/11436-can-the-identify-popup-be-made-relocatable-by-the-en.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/giss-2022/11436/image_4nbzUzsEmxO2g8q7.png" alt="Can the Identify popup be made relocatable by the end-user?"> <div class="post-info"> <h3>Can the Identify popup be made relocatable by the end-user?</h3> </div> </a> </li><li> <a href="/15479-map-matching-gps-points-to-the-road-network.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/giss-2022/15479/image_I552hhulpb1hS7i7ermYzo.jpg" alt="Map-matching GPS points to the road network!"> <div class="post-info"> <h3>Map-matching GPS points to the road network!</h3> </div> </a> </li><li> <a href="/19350-using-dxf-arc-or-circle-accurately-in-arcgis-for-des.html"> <img class="small-img" style="max-width: 75px !important;" src="https://geologyidea.com/img/big/19350/en-using-dxf-arc-or-circle-accurately-in-arcgis-for-des.jpg" alt="Using .DXF Arc or Circle accurately in ArcGIS for Desktop?"> <div class="post-info"> <h3>Using .DXF Arc or Circle accurately in ArcGIS for Desktop?</h3> </div> </a> </li> </ul> </div> </div> <!-- Sidebar Widget, Sidebar Advertise --> <center> <center> <!-- MGID <center><div id="M657953ScriptRootC1043903"> </div> <script>var s1= document.location.host; </script> <script src="https://jsc.mgid.com/l/e/leskanaris.com.1043903.js" async> </script> //MGID--> </center> </center> </div> </aside> <!-- ====================== //Aside .middle-sidebar ====================== --> </div> </div> </div> <!-- =========================== //Middle Content =========================== --> <!-- =========================== //Footer =========================== --> <footer class="footer"> <!-- footer-top --> <div class="footer-top"> <div class="container"> <div class="row"> <!-- Footer Widget, Social Content--> <div class="col-lg-3 col-sm-5 order-lg-1 order-md-1 order-sm-1 order-1 footer-widget footer-social-area"> <p class="widget-title" style="font-size:18px !important; font-weight: bold !important; opacity: 1.0 !important;">Menu</p> <div class="popular-post p-15"> <ul> <li><div class="post-info"><a href="/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Home</p></a></div></li> <li><div class="post-info"><a href="/oil--gas/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Oil & Gas</p></a></div></li><li><div class="post-info"><a href="/teaching-plate-tectonics/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Teaching Plate Tectonics</p></a></div></li><li><div class="post-info"><a href="/gold/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Gold</p></a></div></li><li><div class="post-info"><a href="/oil-and-gas/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Oil and Gas</p></a></div></li><li><div class="post-info"><a href="/earthquakes/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Earthquakes</p></a></div></li><li><div class="post-info"><a href="/minerals/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Minerals</p></a></div></li><li><div class="post-info"><a href="/volcanoes/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Volcanoes</p></a></div></li><li><div class="post-info"><a href="/plate-tectonics/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Plate Tectonics</p></a></div></li><li><div class="post-info"><a href="/maps/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Maps</p></a></div></li><li><div class="post-info"><a href="/astronomy-satellite-space/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Astronomy, Satellite, Space</p></a></div></li><li><div class="post-info"><a href="/metals/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Metals</p></a></div></li><li><div class="post-info"><a href="/gemstones/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Gemstones</p></a></div></li><li><div class="post-info"><a href="/world-records/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   World Records</p></a></div></li><li><div class="post-info"><a href="/geologic-hazards/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Geologic Hazards</p></a></div></li><li><div class="post-info"><a href="/general-geology/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   General Geology</p></a></div></li><li><div class="post-info"><a href="/rock-tumblers/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Rock Tumblers</p></a></div></li><li><div class="post-info"><a href="/rocks/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Rocks</p></a></div></li><li><div class="post-info"><a href="/records/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Records</p></a></div></li><li><div class="post-info"><a href="/geology-articles/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Geology Articles</p></a></div></li><li><div class="post-info"><a href="/geology-dictionary/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Geology Dictionary</p></a></div></li><li><div class="post-info"><a href="/oceanography/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Oceanography</p></a></div></li><li><div class="post-info"><a href="/landslides/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Landslides</p></a></div></li><li><div class="post-info"><a href="/more/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   More</p></a></div></li><li><div class="post-info"><a href="/fossils/"><p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-angle-double-right"></i>   Fossils</p></a></div></li> </ul> </div> </div> <!-- Footer Widget, Site Info--> <div class="col-lg-4 col-md-8 col-sm-9 order-lg-2 order-md-3 order-sm-3 order-3 ml-lg-auto mx-md-auto mx-sm-auto mx-auto footer-widget footer-site-info"> <div class="site-info"> <a class="navbar-brand pb-15 mb-20 d-block" href="/"><center><img src="https://geologyidea.com/template/11geologyidea15/img/logo.png" alt="gm.geologyidea.com"></center></a> <p></p> <div class="icon-list"> <center> <a href="#"><i class="fa fa-facebook"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-google-plus"></i></a> <a href="#"><i class="fa fa-pinterest"></i></a> </center> </div> </div> </div> <!-- Footer Widget, POPULAR POST--> <div class="col-lg-4 col-sm-7 order-lg-3 order-md-2 order-sm-2 order-2 pl-lg-0 footer-widget footer-poputal-post"> <div class="row"> <div class="col-xl-10 col-lg-12 col-md-11 ml-auto"> <p class="widget-title" style="font-size:18px !important; font-weight: bold !important; opacity: 1.0 !important;">Contact Us</p> <!-- Popular Post --> <div class="popular-post p-15"> <ul> <li> <a href="https://geologyidea.com"> <div class="post-info"> <p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "><i class="fa fa-globe"></i>   geologyidea.com</p> </div> </a> </li> <li> <a href="https://www.dynadot.com/domain/contact-request?domain=geologyidea.com&contact=2&contact_reason=2" target="_blank" rel="nofollow"> <div class="post-info"> <p style="font-size: 14px !important; font-weight: bold !important; line-height: 1.5 !important; margin-bottom: .5rem; "> <i class="fa fa-envelope-o"></i>   Contact Us </p> </div> </a> </li> </ul> </div> </div> </div> </div> </div> </div> </div> <!-- /footer-top --> <!-- footer bottom --> <div class="footer-bottom"> <p style="text-align:center !important;"> Copyrights © geologyidea.com <br> <a style="color: #5cca8d !important;" href="//at.geologyidea.com/6480-advanced-python-labeling-in-arcmap-working-with-null.html">Advanced python labeling in ArcMap - working with null values.</a><a style="color: #5cca8d !important;" href="//ss.geologyidea.com/sitemap.xml">.</a><a style="color: #5cca8d !important;" href="//gm.geologyidea.com/sitemap.xml">.</a> </p> </div> </footer> <!-- =========================== //Footer =========================== --> <!-- #preloader <div id="preloader"></div> --> <!-- ======================= Scripts ======================= --> <script src="https://geologyidea.com/template/11geologyidea15/js/modernizr-3.5.0.min.js"></script> <script src="https://geologyidea.com/template/11geologyidea15/js/jquery-3.2.1.min.js"></script> <script src="https://geologyidea.com/template/11geologyidea15/js/plugins.js"></script> <script src="https://geologyidea.com/template/11geologyidea15/js/main.js"></script> <span id="scrollup" class=""><i class="fa fa-angle-double-up"></i></span> <!-- Yandex.Metrika counter --> <script type="text/javascript"> (function(m,e,t,r,i,k,a){ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date(); k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a) })(window, document,"script","//mc.yandex.ru/metrika/tag.js", "ym"); ym(86578477, "init", {accurateTrackBounce:true, trackLinks:true, webvisor:true, clickmap:true, params: {__ym: {isFromApi: "yesIsFromApi"}}}); </script> <!-- /Yandex.Metrika counter --> <script>new Image().src = "//counter.yadro.ru/hit?r" + escape(document.referrer) + ((typeof(screen)=="undefined")?"" : ";s"+screen.width+"*"+screen.height+"*" + (screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ";u"+escape(document.URL) + ";" +Math.random();</script> </body> </html><script type="text/javascript">(function(){window['__CF$cv$params']={r:'6b79af3c586c82da',m:'uV380r5IK9HUU77.48Zl8anjzSSXW9mpPvw3uuiecAk-1638501894-0-ATYcH1tR5+oInx5SRNUgkzGCOrCY9V1bu3Kszgd3jBziripAx5T0TB63dHuL3Nz5PB9r7vyVadR+0JVgnFW7iyfvmGdiDhh0/WiDIWHuWIytPJC7F6LDXBIa9I2pyFohrK6nxC6XsHmJkbSMcOH3iiIuWTX//oAkWLGnYbLnnPs6yZiA094yMgBvNXSghTCNdA==',s:[0xd335365935,0xf4bd037b93],u:'/cdn-cgi/challenge-platform/h/b'}})();</script>