Message posté par : Sylvain M.
----------------------------------------
[pardon, j'ai répondu depuis mon compte pro par erreur, je corrige]
Merci Tumasgiu pour tes bons conseils.
J'ai déjà survolé les fonctions XML et JSON de PG, mais je dois avouer qu'il me
reste encore du chemin à parcourir pour les mettre en pratique.
-----------------
Code :
une fois intégrés les tags au format xml ou json à une table pg
-----------------
Et à vrai dire, c'est justement c'est cette première étape qui va m'être
compliquée (pour tout le reste, c'est du SQL, et ça, je "maîtrise").
J'arrive bien à exporter mes tags au format JSON (ou XML) via cette commande :
-----------------
Code :
exiftool -j -r "M:\monchemin">"M:\dbphotos.json"
-----------------
Je récupère ainsi un JSON qui contient tous les champs disponibles.
(et qui varient d'un fichier à l'autre, car selon les modèles d'appareils,
marques, logiciels, les tags présents sont différents)
Je n'ai pas encore essayé sur la photothèque complète (> 120 000 photos : ça va
prendre des heures, mais ça ça ne me dérange pas).
Voici un exemple d'export sur un seul dossier de 51 photos (et je n'ai laissé que
la 1ere photo) :
-----------------
Code :
[{
"SourceFile": "M:/monchemin/DSC09324.JPG",
"ExifToolVersion": 11.94,
"FileName": "DSC09324.JPG",
"Directory": "M:/monchemin",
"FileSize": "12 MB",
"FileModifyDate": "2020:04:21 10:53:08+02:00",
"FileAccessDate": "2020:04:23 10:52:23+02:00",
"FileCreateDate": "2020:04:21 10:53:08+02:00",
"FilePermissions": "rw-rw-rw-",
"FileType": "JPEG",
"FileTypeExtension": "jpg",
"MIMEType": "image/jpeg",
"ExifByteOrder": "Little-endian (Intel, II)",
"ImageDescription": " ",
"Make": "SONY",
"Model": "ILCA-77M2",
"Orientation": "Horizontal (normal)",
"XResolution": 350,
"YResolution": 350,
"ResolutionUnit": "inches",
"Software": "ILCA-77M2 v2.00",
"ModifyDate": "2020:04:21 10:53:08",
"YCbCrPositioning": "Co-sited",
"ExposureTime": "1/2000",
"FNumber": 9.0,
"ISO": 1000,
"SensitivityType": "Recommended Exposure Index",
"RecommendedExposureIndex": 1000,
"ExifVersion": "0230",
"DateTimeOriginal": "2020:04:21 10:53:08",
"CreateDate": "2020:04:21 10:53:08",
"ComponentsConfiguration": "Y, Cb, Cr, -",
"CompressedBitsPerPixel": 4,
"BrightnessValue": 9.38046875,
"ExposureCompensation": 0,
"MaxApertureValue": 2.8,
"MeteringMode": "Multi-segment",
"LightSource": "Cloudy",
"Flash": "Off, Did not fire",
"FocalLength": "105.0 mm",
"Rating": 0,
"Brightness": 0,
"LongExposureNoiseReduction": "Off",
"HighISONoiseReduction": "Normal",
"HDR": "Off; Uncorrected image",
"WBShiftAB_GM": "0 0",
"FaceInfoOffset": 94,
"SonyDateTime": "2020:04:21 10:53:08",
"SonyImageWidth": 6000,
"FacesDetected": 0,
"FaceInfoLength": 37,
"MetaVersion": "DC7303320222000",
"CreativeStyle": "Standard",
"ColorTemperature": "Auto",
"ColorCompensationFilter": 0,
"SceneMode": "Standard",
"ZoneMatching": "ISO Setting Used",
"DynamicRangeOptimizer": "Off",
"ImageStabilization": "On",
"ColorMode": "Standard",
"FullImageSize": "6000x4000",
"PreviewImageSize": "1616x1080",
"FileFormat": "ARW 2.3.1",
"Quality": "Extra Fine",
"FlashExposureComp": 0,
"WhiteBalanceFineTune": 0,
"WhiteBalance": "Cloudy",
"SonyModelID": "ILCA-77M2",
"MultiFrameNoiseReduction": "Off",
"PictureEffect": "Off",
"SoftSkinEffect": "Off",
"VignettingCorrection": "Auto",
"LateralChromaticAberration": "Auto",
"DistortionCorrectionSetting": "Off",
"LensType": "Tamron or Sigma Lens (128)",
"LensSpec": "105mm F2.8",
"AutoPortraitFramed": "No",
"FlashAction": "Did not fire",
"ElectronicFrontCurtainShutter": "On",
"FocusMode": "AF-A",
"AFAreaModeSetting": "Expanded Flexible Spot",
"AFPointSelected": "F6",
"AFPointsUsed": "F6, G6",
"AFTracking": "Off",
"MultiFrameNREffect": "Normal",
"FlashLevel": "Normal",
"ReleaseMode": "Continuous",
"SequenceNumber": 1,
"Anti-Blur": "On (Shooting)",
"ShotNumberSincePowerUp": 1,
"SequenceImageNumber": 1,
"SequenceFileNumber": 1,
"SequenceLength": "Continuous",
"CameraOrientation": "Horizontal (normal)",
"Quality2": "JPEG",
"SonyImageHeight": 4000,
"ModelReleaseYear": 2014,
"ISOSetting": 1000,
"ISOAutoMin": 100,
"ISOAutoMax": 3200,
"ExposureProgram": "Aperture-priority AE",
"IntelligentAuto": "Off",
"FocusPosition2": 113,
"SonyISO": 1010,
"BaseISO": 100,
"StopsAboveBaseISO": 3.3,
"SonyExposureTime2": "1/1823",
"SonyMaxApertureValue": 2.8,
"SonyImageWidthMax": 6024,
"SonyImageHeightMax": 4024,
"PictureEffect2": "Off",
"DistortionCorrection": "None",
"DistortionCorrParams": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
"VignettingCorrParams": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
"ChromaticAberrationCorrParams": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0",
"BatteryTemperature": "27.2 C",
"BatteryLevel": "19%",
"AFType": "79-point",
"AFPoint": "F6",
"AFPointInFocus": "F6",
"AFPointAtShutterRelease": "(none)",
"AFAreaMode": "Expanded Flexible Spot",
"AFStatusActiveSensor": "Out of Focus",
"AFMicroAdj": 0,
"AFStatus_00_B4": "Out of Focus",
"AFStatus_01_C4": "Out of Focus",
"AFStatus_02_D4": "Out of Focus",
"AFStatus_03_E4": "Out of Focus",
"AFStatus_04_F4": "Out of Focus",
"AFStatus_05_G4": "Out of Focus",
"AFStatus_06_H4": "Out of Focus",
"AFStatus_07_B3": "Out of Focus",
"AFStatus_08_C3": "Out of Focus",
"AFStatus_09_D3": "Out of Focus",
"AFStatus_10_E3": "Out of Focus",
"AFStatus_11_F3": "Out of Focus",
"AFStatus_12_G3": "Out of Focus",
"AFStatus_13_H3": "Out of Focus",
"AFStatus_14_B2": "Out of Focus",
"AFStatus_15_C2": "Out of Focus",
"AFStatus_16_D2": "Out of Focus",
"AFStatus_17_E2": "Out of Focus",
"AFStatus_18_F2": "Out of Focus",
"AFStatus_19_G2": "Out of Focus",
"AFStatus_20_H2": "Out of Focus",
"AFStatus_21_C1": "Out of Focus",
"AFStatus_22_D1": "Out of Focus",
"AFStatus_23_E1": "Out of Focus",
"AFStatus_24_F1": "Out of Focus",
"AFStatus_25_G1": "Out of Focus",
"AFStatus_26_A7_Vertical": "Out of Focus",
"AFStatus_27_A6_Vertical": "Out of Focus",
"AFStatus_28_A5_Vertical": "Out of Focus",
"AFStatus_29_C7_Vertical": "Out of Focus",
"AFStatus_30_C6_Vertical": "Out of Focus",
"AFStatus_31_C5_Vertical": "Out of Focus",
"AFStatus_32_E7_Vertical": "Out of Focus",
"AFStatus_33_E6_Center_Vertical": "Out of Focus",
"AFStatus_34_E5_Vertical": "Out of Focus",
"AFStatus_35_G7_Vertical": "Out of Focus",
"AFStatus_36_G6_Vertical": "Out of Focus",
"AFStatus_37_G5_Vertical": "Out of Focus",
"AFStatus_38_I7_Vertical": "Back Focus (+963)",
"AFStatus_39_I6_Vertical": "Back Focus (+1064)",
"AFStatus_40_I5_Vertical": "Out of Focus",
"AFStatus_41_A7": "Out of Focus",
"AFStatus_42_B7": "Out of Focus",
"AFStatus_43_C7": "Out of Focus",
"AFStatus_44_D7": "Out of Focus",
"AFStatus_45_E7": "Out of Focus",
"AFStatus_46_F7": "Out of Focus",
"AFStatus_47_G7": "Out of Focus",
"AFStatus_48_H7": "Out of Focus",
"AFStatus_49_I7": "Out of Focus",
"AFStatus_50_A6": "Out of Focus",
"AFStatus_51_B6": "Out of Focus",
"AFStatus_52_C6": "Out of Focus",
"AFStatus_53_D6": "Out of Focus",
"AFStatus_54_E6_Center": "Out of Focus",
"AFStatus_55_F6": "Out of Focus",
"AFStatus_56_G6": "Out of Focus",
"AFStatus_57_H6": "Out of Focus",
"AFStatus_58_I6": "Out of Focus",
"AFStatus_59_A5": "Out of Focus",
"AFStatus_60_B5": "Out of Focus",
"AFStatus_61_C5": "Out of Focus",
"AFStatus_62_D5": "Out of Focus",
"AFStatus_63_E5": "Back Focus (+672)",
"AFStatus_64_F5": "Back Focus (+671)",
"AFStatus_65_G5": "Back Focus (+652)",
"AFStatus_66_H5": "Out of Focus",
"AFStatus_67_I5": "Out of Focus",
"AFStatus_68_C11": "Out of Focus",
"AFStatus_69_D11": "Out of Focus",
"AFStatus_70_E11": "Out of Focus",
"AFStatus_71_F11": "Out of Focus",
"AFStatus_72_G11": "Out of Focus",
"AFStatus_73_B10": "Out of Focus",
"AFStatus_74_C10": "Out of Focus",
"AFStatus_75_D10": "Out of Focus",
"AFStatus_76_E10": "Out of Focus",
"AFStatus_77_F10": "Out of Focus",
"AFStatus_78_G10": "Out of Focus",
"AFStatus_79_H10": "Out of Focus",
"AFStatus_80_B9": "Out of Focus",
"AFStatus_81_C9": "Out of Focus",
"AFStatus_82_D9": "Out of Focus",
"AFStatus_83_E9": "Out of Focus",
"AFStatus_84_F9": "Out of Focus",
"AFStatus_85_G9": "Out of Focus",
"AFStatus_86_H9": "Out of Focus",
"AFStatus_87_B8": "Out of Focus",
"AFStatus_88_C8": "Out of Focus",
"AFStatus_89_D8": "Out of Focus",
"AFStatus_90_E8": "Out of Focus",
"AFStatus_91_F8": "Out of Focus",
"AFStatus_92_G8": "Out of Focus",
"AFStatus_93_H8": "Out of Focus",
"AFStatus_94_E6_Center_F2-8": "Out of Focus",
"ReleaseMode3": "Continuous",
"SelfTimer": "Off",
"FlashMode": "Fill-flash",
"HDRSetting": "Off",
"PictureProfile": "Gamma Still - Standard/Neutral (PP2)",
"WB_RGBLevels": "669 256 442",
"MinFocalLength": "105.0 mm",
"MaxFocalLength": "105.0 mm",
"DistortionCorrParamsNumber": "11 (APS-C)",
"SonyMaxAperture": 2.8,
"SonyMinAperture": 22,
"Shutter": "Mechanical (2536 4182 5274)",
"FlashStatus": "Built-in Flash present",
"ShutterCount": 55797,
"SonyExposureTime": "1/1823",
"SonyFNumber": 9.0,
"ReleaseMode2": "Continuous",
"InternalSerialNumber": "0706a22367",
"LensMount": "A-mount",
"LensFormat": "Full-frame",
"DistortionCorrParamsPresent": "No",
"LensSpecFeatures": "",
"ShutterCount3": 55797,
"UserComment": "",
"FlashpixVersion": "0100",
"ColorSpace": "sRGB",
"ExifImageWidth": 6000,
"ExifImageHeight": 4000,
"InteropIndex": "R98 - DCF basic file (sRGB)",
"InteropVersion": "0100",
"FileSource": "Digital Camera",
"SceneType": "Directly photographed",
"CustomRendered": "Normal",
"ExposureMode": "Auto",
"DigitalZoomRatio": 1,
"FocalLengthIn35mmFormat": "157 mm",
"SceneCaptureType": "Standard",
"Contrast": "Normal",
"Saturation": "Normal",
"Sharpness": "Normal",
"LensInfo": "105mm f/2.8",
"LensModel": "105mm F2.8",
"PrintIMVersion": "0300",
"Compression": "JPEG (old-style)",
"ThumbnailOffset": 38514,
"ThumbnailLength": 5243,
"MPFVersion": "0100",
"NumberOfImages": 2,
"MPImageFlags": "Dependent child image",
"MPImageFormat": "JPEG",
"MPImageType": "Large Thumbnail (full HD equivalent)",
"MPImageLength": 380460,
"MPImageStart": 11734016,
"DependentImage1EntryNumber": 0,
"DependentImage2EntryNumber": 0,
"ImageWidth": 6000,
"ImageHeight": 4000,
"EncodingProcess": "Baseline DCT, Huffman coding",
"BitsPerSample": 8,
"ColorComponents": 3,
"YCbCrSubSampling": "YCbCr4:2:2 (2 1)",
"Aperture": 9.0,
"BlueBalance": 1.726563,
"ImageSize": "6000x4000",
"LensID": "Sigma 105mm F2.8 EX DG OS HSM Macro",
"Megapixels": 24.0,
"RedBalance": 2.613281,
"ScaleFactor35efl": 1.5,
"ShutterSpeed": "1/2000",
"ThumbnailImage": "(Binary data 5243 bytes, use -b option to
extract)",
"PreviewImage": "(Binary data 380460 bytes, use -b option to
extract)",
"FocusDistance2": "0.81 m",
"CircleOfConfusion": "0.020 mm",
"FOV": "13.1 deg",
"FocalLength35efl": "105.0 mm (35 mm equivalent: 157.0 mm)",
"HyperfocalDistance": "60.96 m",
"LightValue": 14.0
},
{
... autres photos ...
}]
-----------------
Si jamais tu as des piste pour gérer ce type d'import, je prends (ce qui ne veut pas
dire que je ne cherche pas d'abord par moi-même aussi ! ;) ).
A+
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=332661#p332661
Pour y répondre : geobd(a)ml.georezo.net ou reply de votre messagerie
Pour vous désabonner connectez-vous sur le forum puis Profil / Abonnement
--
Association GeoRezo - le portail géomatique
https://georezo.net