+ Photo photo = createPhoto(inFile);
+ if (photo.getDataPoint() != null) {
+ _fileCounts[2]++; // photo has coordinates
+ }
+ // Check the criteria for adding the photo - check whether the photo has coordinates and if so if they're within the rectangle
+ if ( (photo.getDataPoint() != null || _noExifCheckbox.isSelected())
+ && (photo.getDataPoint() == null || !_outsideAreaCheckbox.isEnabled()
+ || _outsideAreaCheckbox.isSelected() || _trackRectangle.containsPoint(photo.getDataPoint())))
+ {
+ _photos.add(photo);
+ }
+ }
+
+ /**
+ * Create a Photo object for the given file, including reading exif information
+ * @param inFile file object
+ * @return Photo object
+ */
+ public static Photo createPhoto(File inFile)
+ {
+ // Create Photo object
+ Photo photo = new Photo(inFile);