public function exifRead($target) { $reader = new ExifReader($this->modx); $reader->target = $this->getTargetPath($target); return $reader->process(); }
$type = "SHP"; } else { if (strtolower($extension) == "shx" || strtolower($extension) == "dbf") { continue; } else { $url = MSP_GETFILE_URL . $fileName . $stream; /* * JPG special case * * JPG images generally have EXIF tags. * If EXIF description contains GPS location, it is assumed that * the JPG image is a mapshup "Picture" wich means a GeoJSON * point with attributes including the picture itself */ if (strtolower($extension) == "jpg") { $exif = new ExifReader(); $feature = $exif->readImage(MSP_UPLOAD_DIR . $fileName); /* * The image is localized => it is a Photography */ if ($feature != null) { $ignore = true; $type = "Photography"; /* * Generate a 75x75 pixels icon from image and set * it's url within the 'icon' property */ $iconName = str_replace('.' . $extension, '_t.' . $extension, $fileName); exec(MSP_GDAL_TRANSLATE_PATH . ' -of JPEG -outsize 75 75 ' . MSP_UPLOAD_DIR . $fileName . ' ' . MSP_UPLOAD_DIR . $iconName); $feature['properties']['title'] = $fileNameOri; $feature['properties']['quicklook'] = MSP_GETFILE_URL . $fileName . $stream;