{"id":10362,"date":"2022-05-02T07:00:41","date_gmt":"2022-05-01T22:00:41","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10362"},"modified":"2022-05-02T04:26:09","modified_gmt":"2022-05-01T19:26:09","slug":"python-%e3%81%a7%e5%86%99%e7%9c%9f%e3%81%8b%e3%82%89%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e6%8a%9c%e3%81%8d%e5%87%ba%e3%81%97%e3%80%81%e5%b8%82%e5%8c%ba%e7%94%ba%e6%9d%91%e3%81%94%e3%81%a8","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10362","title":{"rendered":"Python \u3067\u5199\u771f\u304b\u3089\u4f4d\u7f6e\u60c5\u5831\u3092\u629c\u304d\u51fa\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u5206\u3051\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\u6614\u304b\u3089\u3044\u308d\u3093\u306a\u300c<strong>\u73cd\u30b9\u30dd\u30c3\u30c8<\/strong>\u300d\u306b\u884c\u304f\u306e\u304c\u597d\u304d\u306a\u306e\u3067\u3059\u304c\u3001\u305d\u3046\u306a\u308b\u3068\u3084\u306f\u308a\u5199\u771f\u3092\u30d0\u30f3\u30d0\u30f3\u64ae\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u81ea\u4f53\u306f\u3044\u3044\u3053\u3068\u306a\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u4f55\u5e74\u3082\u5199\u771f\u3092\u53d6\u308a\u7d9a\u3051\u308b\u3068\u6b21\u306e\u3088\u3046\u306a\u554f\u984c\u304c\u3084\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><strong style=\"font-size: 35px;\">\u300c\u3042\u306e\u5834\u6240\u306e\u5199\u771f\u3001\u3069\u3053\u306b\u3042\u308b\u3093\u3060\u3063\u3051\u2026\ud83d\udca6\u300d<\/strong><\/p>\n<p>\u305d\u3046\u3067\u3059\u3002<br \/>\n\u5199\u771f\u306e\u6570\u304c\u591a\u3059\u304e\u3066\u300c\u624b\u4f5c\u696d\u3067\u63a2\u3059\u306e\u306f\u30e0\u30ea\u3042\u308b\u306a\u3001\u3001\u3001\u3058\u3083\u3001\u3082\u3046\u3044\u3044\u3063\u304b\u300d\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u6298\u89d2\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u304a\u4ed5\u4e8b\u3092\u3057\u3066\u308b\u306e\u3067\u3001\u4eca\u56de\u306f<code>Google Cloud<\/code>\u3092\u4f7f\u3063\u3066\u300c<strong>\u5199\u771f\u3092\u5e02\u533a\u753a\u6751\u5225\u3067\u632f\u308a\u5206\u3051\u308b<\/strong>\u300d\u3068\u3044\u3046\u5b9f\u88c5\u3092\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3566 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><span style=\"font-size: 1rem;\">\u300c\u3084\u3063\u3068\u30c9\u30e9\u30af\u30a8\u3063\u307d\u3044<br \/>\n\u666f\u8272\u3092\u898b\u3089\u308c\u307e\u3057\u305f \ud83d\udc47<br \/>\n\uff08\u62e1\u5927\u3067\u304d\u307e\u3059\uff09\u300d<br \/>\n<a href=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/PXL_20220416_055054792_2_sm.jpg\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10378\" style=\"width: 150px;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/PXL_20220416_055054792_2_sm.jpg\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/PXL_20220416_055054792_2_sm.jpg 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/PXL_20220416_055054792_2_sm-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n<\/a><br \/>\n<\/span><\/p>\n<p><strong>\u5b9f\u884c\u74b0\u5883\uff1a<\/strong> Python 3<\/p>\n<h1>\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5<\/h1>\n<p>\u4eca\u56de\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u300c<strong>\u30d5\u30a9\u30eb\u30c0\u632f\u308a\u5206\u3051<\/strong>\u300d\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u5199\u771f\u304b\u3089\u4f4d\u7f6e\u60c5\u5831\uff08GPS\uff09\u3092\u53d6\u5f97<\/li>\n<li>\u305d\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u4f7f\u3063\u3066\u3001Google Cloud \u304b\u3089\u4f4f\u6240\u3092\u53d6\u5f97\uff08\u30b8\u30aa\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff09<\/li>\n<li>\u4f4f\u6240\u304b\u3089\u5199\u771f\u3092\u5404\u30d5\u30a9\u30eb\u30c0\u306b\u632f\u308a\u5206\u3051\u308b<\/li>\n<\/ol>\n<p>\u3061\u306a\u307f\u306b<code>Google Cloud<\/code>\u306e\u300c<strong>\u30b8\u30aa\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 API<\/strong>\u300d\u306f\u3001\u7dcf\u5408\u7684\u306b\u30de\u30c3\u30d7 API \u306e\u6599\u91d1\u3068\u3057\u3066\u63db\u7b97\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u6bce\u6708 $200 \u5206\u306f\u7121\u6599\u306b\u306a\u308b\u306e\u3067\u3001\u5358\u7d14\u8a08\u7b97\u3067<code>40,000<\/code>\u56de\u307e\u3067\u306f\u7121\u6599\u3067\u4f7f\u3048\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u305f\u3060\u3057\u3001\u4ed6\u306eAPI\u3068\u3082\u5408\u7b97\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u203b \u307e\u305f\u3001\uff08\u3082\u3061\u308d\u3093\u3067\u3059\u304c\uff09\u5199\u771f\u306bGPS\u30c7\u30fc\u30bf\u304c\u57cb\u3081\u8fbc\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3002\u3054\u81ea\u8eab\u306e\u30b9\u30de\u30db\u3067\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306e\u4f5c\u696d\u306b\u5165\u308b\u524d\u306b\u5fc5\u8981\u306b\u306a\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>pip3 install exif<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u5199\u771f\u304b\u3089<code>GPS<\/code>\u30c7\u30fc\u30bf\u3092\u629c\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>Google Cloud \u3067 Geocoding API \u3092\u6709\u52b9\u306b\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f\u300c<strong>GPS\u30c7\u30fc\u30bf \u2192 \u4f4f\u6240<\/strong>\u300d\u3078\u5909\u63db\u3059\u308b\u305f\u3081\u306e\u300c<strong>Geocoding API<\/strong>\u300d\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/cloud.google.com\/\" target=\"_blank\" rel=\"noopener\">Google Cloud<\/a> \u3078\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u4e0a\u90e8\u306b\u3042\u308b<code>API<\/code>\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u306b\u300c<strong>geocoding<\/strong>\u300d\u3068\u5165\u529b\u3059\u308b\u3068\u3001\u5019\u88dc\u306b\u300c<strong>Geocoding API<\/strong>\u300d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\uff08\u26a0\u3054\u6ce8\u610f\uff1a \u3082\u3057<code>Google Cloud<\/code>\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u9069\u5f53\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u8a73\u3057\u304f\u306f <a href=\"https:\/\/blog.capilano-fw.com\/?p=3359#i-2\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10368\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_1.png\" alt=\"\" width=\"463\" height=\"286\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_1.png 463w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_1-300x185.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u300c\u6709\u52b9\u306b\u3059\u308b\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10367\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_2.png\" alt=\"\" width=\"517\" height=\"221\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_2.png 517w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_2-300x128.png 300w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001<code>Google Cloud<\/code>\u3067<code>Geocoding API<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>API \u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u3092\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u6b21\u306b<code>Python<\/code>\u304b\u3089<code>Google Cloud<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u300c<strong>API \u30ad\u30fc<\/strong>\u300d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u30da\u30fc\u30b8\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li>\u753b\u9762\u5de6\u4e0a\u306e\u30cf\u30f3\u30d0\u30fc\u30ac\u30fc\u30dc\u30bf\u30f3<\/li>\n<li>API \u3068\u30b5\u30fc\u30d3\u30b9<\/li>\n<li>\u8a8d\u8a3c\u60c5\u5831<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10369\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_3.png\" alt=\"\" width=\"489\" height=\"402\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_3.png 489w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_3-300x247.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u8a8d\u8a3c\u60c5\u5831\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\u3059\u308b\u306e\u3067\u3001\u540c\u3058\u304f\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li>\u8a8d\u8a3c\u60c5\u5831\u3092\u4f5c\u6210<\/li>\n<li>API \u30ad\u30fc<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10365\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_4.png\" alt=\"\" width=\"516\" height=\"227\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_4.png 516w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_4-300x132.png 300w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/p>\n<p>\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u81ea\u52d5\u3067\u300c<strong>API \u30ad\u30fc<\/strong>\u300d\u3092\u4f5c\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002<br \/>\n\u5f8c\u3067\u4f7f\u3046\u306e\u3067\u30e1\u30e2\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10364\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_5.png\" alt=\"\" width=\"542\" height=\"261\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_5.png 542w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_5-300x144.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u3053\u306eAPI\u30ad\u30fc\u306f\u7121\u5236\u9650\u306bAPI\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u672c\u756a\u74b0\u5883\u3067\u4f7f\u3046\u5834\u5408\u306f\u300c<strong>\u3053\u306eAPI\u3060\u3051 OK \u306b\u3059\u308b<\/strong>\u300d\u3068\u3044\u3063\u305f\u5236\u9650\u3092\u304b\u3051\u3066\u304a\u304f\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\ud83d\udc4d<\/p>\n<h1>Python \u306e\u30b3\u30fc\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u672c\u984c\u306e<code>Python<\/code>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u3059\u3002<br \/>\n\u307e\u305a\u306f\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre><strong>#!\/usr\/bin\/env python\r\n# -*- coding: utf-8 -*-\r\n\r\nimport requests\r\nfrom exif import Image\r\nimport os\r\nimport glob\r\nimport json\r\nimport pathlib\r\nimport shutil\r\n\r\n# \u5b9a\u6570\r\nGCP_API_KEY = '\uff08\u3053\u3053\u306bGoogle Cloud \u306e API\u30ad\u30fc\uff09'\r\nPHOTO_DIR = '.\/photos'\r\nSAVE_DIR = '.\/classified_photos'\r\n\r\n# \u95a2\u6570\uff08ref -&gt; N\uff1a\u5317\u7def\uff5cS\uff1a\u5357\u7def\uff5cW\uff1a\u897f\u7d4c\uff5cE\uff1a\u6771\u7d4c\uff09\r\ndef convert_DMS_to_DD(DMS, ref):\r\n    dd = DMS[0] + DMS[1]\/60 + DMS[2]\/(60*60)\r\n    if ref == 'S' or ref == 'W':\r\n        dd = dd * -1\r\n    return dd\r\n\r\ndef get_coordinates(image):\r\n    latitude = None\r\n    longitude = None\r\n    if hasattr(image, 'gps_latitude_ref') and hasattr(image, 'gps_latitude'): # \u7def\u5ea6\r\n        latitude_ref = image.gps_latitude_ref # N or S\uff08\u5317\u7def or \u5357\u7def\uff09\r\n        latitude = convert_DMS_to_DD(image.gps_latitude, latitude_ref)\r\n    if hasattr(image, 'gps_longitude_ref') and hasattr(image, 'gps_longitude'): # \u7d4c\u5ea6\r\n        longitude_ref = image.gps_longitude_ref # W or E\uff08\u897f\u7d4c or \u6771\u7d4c\uff09\r\n        longitude = convert_DMS_to_DD(image.gps_longitude, longitude_ref)\r\n    return latitude,longitude\r\n\r\ndef get_location_from_gcp(latitude, longitude): # Geocoding API \u304b\u3089\u300c\u90fd\u9053\u5e9c\u770c\u300d\u3068\u300c\u5e02\u533a\u753a\u6751\u300d\u3092\u53d6\u5f97\r\n    prefecture = ''\r\n    city = ''\r\n    url = 'https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json?latlng='+ str(latitude) +'%2C'+ str(longitude) +'&amp;key='+ GCP_API_KEY +'&amp;language=ja'\r\n    response = requests.request('GET', url)\r\n    if response.status_code == 200:\r\n        addresses = json.loads(response.text)\r\n        results = addresses['results']\r\n        for result in results:\r\n            address_components = result['address_components']\r\n            for address_component in address_components:\r\n                types = address_component['types']\r\n                if 'locality' in types or 'administrative_area_level_2' in types:\r\n                    city = address_component['long_name']\r\n                elif 'administrative_area_level_1' in types:\r\n                    prefecture = address_component['long_name']\r\n    return prefecture, city\r\n\r\ndef save_classifed_photo(path, prefecture, city):\r\n    if city == '':\r\n        city = '\u4e0d\u660e'\r\n    saving_prefecture_dir = SAVE_DIR +'\/'+ prefecture\r\n    saving_city_dir = saving_prefecture_dir +'\/'+ city\r\n    pathlib.Path(saving_prefecture_dir).mkdir(parents=True, exist_ok=True) \r\n    pathlib.Path(saving_city_dir).mkdir(parents=True, exist_ok=True)\r\n    filename = os.path.basename(path)\r\n    saving_path = saving_city_dir +'\/'+ filename\r\n    shutil.copyfile(path, saving_path)\r\n    print('Saved: '+ filename)\r\n\r\n# \u30d5\u30a9\u30eb\u30c0\u304b\u3089\u5168\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u53d6\u5f97\r\nphoto_paths = glob.glob(PHOTO_DIR +'\/*')\r\n\r\nfor photo_path in photo_paths:\r\n    with open(photo_path, 'rb') as f:\r\n        image = Image(f)\r\n        if image.has_exif == True:\r\n            latitude,longitude = get_coordinates(image)\r\n            if latitude != None and longitude != None:\r\n                prefecture,city = get_location_from_gcp(latitude, longitude) # \u90fd\u9053\u5e9c\u770c &amp; \u5e02\u533a\u753a\u6751 \u3092\u53d6\u5f97\r\n                if prefecture != '':\r\n                    save_classifed_photo(photo_path, prefecture, city)\r\n                else:\r\n                    print('\u90fd\u9053\u5e9c\u770c\uff06\u5e02\u533a\u753a\u6751\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093')\r\n            else:\r\n                print('\u4f4d\u7f6e\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093')\r\n        else:\r\n            print('Exif \u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093')<\/strong><\/pre>\n<p>\u5c11\u3057\u30b3\u30fc\u30c9\u304c\u8907\u96d1\u306a\u90e8\u5206\u3082\u3042\u308b\u306e\u3067\u3072\u3068\u3064\u305a\u3064\u3054\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u5b9a\u6570<\/h2>\n<p>\u3053\u306e\u4e2d\u306b\u5148\u307b\u3069<code>Google Cloud<\/code>\u3067\u53d6\u5f97\u3057\u305f\u300c<strong>API\u30ad\u30fc<\/strong>\u300d\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>convert_DMS_to_DD()<\/h2>\n<p>\u3053\u306e\u95a2\u6570\u306f\u3001\u5ea7\u6a19\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u3092\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u3001\u300c\u5ea6\u30fb\u5206\u30fb\u79d2\u300d\u5f62\u5f0f \u2192 \u5341\u9032\u6570\uff08\u5341\u9032\u89d2\u3068\u8a00\u3046\u3089\u3057\u3044\u3067\u3059\uff09\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001<code>Geocoding API<\/code>\u306e\u5f62\u5f0f\u306b\u5408\u308f\u305b\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u65e5\u672c\u306b\u4f4f\u3093\u3067\u3044\u308b\u3068\u3042\u307e\u308a\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u300c\u897f\u7d4c\u300d\u3082\u3057\u304f\u306f\u300c\u5357\u7def\u300d\u306e\u4f4d\u7f6e\u30c7\u30fc\u30bf\u306e\u5834\u5408\u306f\u6570\u5024\u304c\u30de\u30a4\u30ca\u30b9\u306b\u306a\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>get_coordinates()<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001\u753b\u50cf\u304b\u3089\u53d6\u5f97\u3057\u305f<code>Exif<\/code>\u30c7\u30fc\u30bf\u306e\u4e2d\u304b\u3089\u5fc5\u8981\u306a\u3082\u306e\u3060\u3051\u629c\u304d\u51fa\u3057\u3001<code>convert_DMS_to_DD()<\/code>\u3078\u9001\u4fe1\u3057\u3001\u6700\u7d42\u7684\u306b\u5341\u9032\u6570\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>get_location_from_gcp()<\/h2>\n<p>\u3053\u3053\u304c\u4e00\u756a\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u306b\u306a\u308b\u90e8\u5206\u3067\u3001<code>Geocoding API<\/code>\u3092\u4f7f\u3063\u3066\u4f4f\u6240\uff08\u90fd\u9053\u5e9c\u770c\u3084\u5e02\u533a\u753a\u6751\u3001\u901a\u308a\u306e\u540d\u524d\u306a\u3069\uff09\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u90fd\u9053\u5e9c\u770c\u304b\u5e02\u533a\u753a\u6751\u304b\u3092\u5224\u5225\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>types \u306b \u300clocality\u300d\u3082\u3057\u304f\u306f\u300cadministrative_area_level_2\u300d\u304c\u5165\u3063\u3066\u3044\u308b \ud83d\udc49 \u5e02\u533a\u753a\u6751<\/li>\n<li>types \u306b\u300cadministrative_area_level_1\u300d\u304c\u5165\u3063\u3066\u3044\u308b \ud83d\udc49 \u90fd\u9053\u5e9c\u770c<\/li>\n<\/ul>\n<p>\u203b \u305f\u304f\u3055\u3093\u5b9f\u884c\u3057\u3066\u306a\u3044\u306e\u3067\u3001\u4f8b\u5916\u304c\u51fa\u3066\u304f\u308b\u304b\u3082\u3067\u3059\u304c\u30fb\u30fb\u30fb\u3042\u3057\u304b\u3089\u305a\ud83d\ude05<\/p>\n<h2>save_classifed_photo()<\/h2>\n<p>\u6700\u5f8c\u306b\u5224\u5225\u3057\u305f\u5199\u771f\u30d5\u30a1\u30a4\u30eb\u3092\u5404\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3082\u3057\u5e02\u533a\u753a\u6751\u3060\u3051\u304c\u53d6\u5f97\u51fa\u6765\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u300c<strong>\u90fd\u9053\u5e9c\u770c \uff1e \u4e0d\u660e<\/strong>\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a\u306f\u3001<code>photos<\/code>\u30d5\u30a9\u30eb\u30c0\u306b\u4ee5\u4e0b\uff17\u3064\u306e\u5199\u771f\u3092\u8a2d\u7f6e\u3057\u307e\u3059\u3002\uff08\u79c1\u304c\u65c5\u3057\u305f\u5404\u5730\u306e\u5199\u771f\u3067\u3059\ud83d\udc4d\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10372\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_6.png\" alt=\"\" width=\"520\" height=\"584\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_6.png 520w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_6-267x300.png 267w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u632f\u308a\u5206\u3051\u5148\u306e\u30d5\u30a9\u30eb\u30c0<code>classified_photos<\/code>\u304c\u7a7a\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10371\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_7.png\" alt=\"\" width=\"457\" height=\"208\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_7.png 457w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_7-300x137.png 300w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/p>\n<p>\u3067\u306f\u3001\u6e96\u5099\u306f\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002GO\u2757<\/p>\n<pre><strong>python3 classify_photos.py<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10376\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_11.png\" alt=\"\" width=\"255\" height=\"156\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u300c\u4fdd\u5b58\u3057\u307e\u3057\u305f\u300d\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\uff17\u3064\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10375\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_8.png\" alt=\"\" width=\"460\" height=\"285\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_8.png 460w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_8-300x186.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/p>\n<p>\u60f3\u5b9a\u901a\u308a\u90fd\u9053\u5e9c\u770c\u306e\u30d5\u30a9\u30eb\u30c0\u304c\u51fa\u6765\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3067\u306f\u3001\u3053\u306e\u4e2d\u304b\u3089\u300c\u3044\u3064\u304b\u4f4f\u3093\u3067\u307f\u305f\u3044\u300d\u3068\u601d\u3046\u307b\u3069\u6c17\u306b\u5165\u3063\u3066\u3044\u308b\u5ca1\u5c71\u770c\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10374\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_9.png\" alt=\"\" width=\"308\" height=\"147\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_9.png 308w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_9-300x143.png 300w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u5e02\u533a\u753a\u6751\u30d5\u30a9\u30eb\u30c0\u306b\u5206\u985e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u6700\u8fd1\u884c\u3063\u305f\u702c\u6238\u5185\u5e02\u306e\u4e2d\u8eab\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5199\u771f\u306f\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10373\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/04\/python_classify_photos_10.png\" alt=\"\" width=\"183\" height=\"188\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u304d\u3061\u3093\u3068\u702c\u6238\u5185\u5e02\u5185\u3067\u64ae\u5f71\u3057\u305f\u5199\u771f\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u5168\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b\u5199\u771f\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3066\u3044\u308b\u4f4d\u7f6e\u60c5\u5831\u3092\u4f7f\u3048\u3070\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u5206\u985e\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u305d\u308c\u3089\u3092\u5730\u56f3\u4e0a\u3067\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4f4d\u7f6e\u60c5\u5831\u3060\u3051\u3067\u306a\u304f\u64ae\u5f71\u3055\u308c\u305f\u65e5\u6642\u3084\u9ad8\u5ea6\u306a\u3069\u305d\u306e\u4ed6\u306e\u60c5\u5831\u3082\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u5fa1\u793e\u304c\u79fb\u52d5\u3092\u591a\u304f\u3055\u308c\u308b\u696d\u52d9\u3092\u304a\u6301\u3061\u3067\u3057\u305f\u3089\u3001\u696d\u52d9\u52b9\u7387\u5316\u306e\u304a\u529b\u306b\u306a\u308c\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3053\u3046\u3044\u3063\u305f\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u304a\u554f\u3044\u5408\u308f\u305b\u3088\u308a\u304a\u6c17\u8efd\u306b\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Python<\/code>\u3092\u4f7f\u3063\u3066\u5199\u771f\u306eGPS\u4f4d\u7f6e\u60c5\u5831\u304b\u3089\u5e02\u533a\u753a\u6751\u3054\u3068\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u5206\u985e\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b<code>Google Cloud<\/code>\u3060\u3051\u3067\u306a\u304f\u3001\u6709\u540d\u306a<code>AWS<\/code>\uff08Amazon Web Service\uff09\u3092\u4f7f\u3046\u3053\u3068\u3067\u500b\u4eba\u7684\u3067\u3082\u3044\u308d\u3044\u308d\u5b9f\u73fe\u3067\u304d\u308b\u306e\u3067\u3001\u65e5\u66dc\u5927\u5de5\u306a\u3089\u306c\u300c<strong>\u65e5\u66dc\u30d7\u30ed\u30b0\u30e9\u30de<\/strong>\u300d\u3068\u3057\u3066\u697d\u3057\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\uff08\u3057\u304b\u3082\u7121\u6599\u67a0\u304c\u3042\u308b\u306e\u3067\u3046\u307e\u304f\u3059\u308c\u3070\u304a\u91d1\u306f\u304b\u304b\u308a\u307e\u305b\u3093\ud83d\ude09\u2728\uff09<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6700\u8fd1\u306f\u300c\u81ea\u5206\u3067\u306a\u3093\u3067\u3082\u958b\u767a\u3059\u308b\u300d\u304b\u3089\u300c\u3042\u308b\u3082\u306e\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u300d\u30d1\u30bf\u30fc\u30f3\u3082\u5927\u4e8b\u306a\u3093\u3060\u306a\u3068\u611f\u3058\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u8da3\u5473\u3068\u5b9f\u76ca\u3092\u517c\u306d\u3066\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6068 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png\" alt=\"\" width=\"226\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png 226w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12-212x300.png 212w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/>\u300c\u65e5\u672c\u4e00\u77ed\u3044<br \/>\n\u300e\u3076\u3064\u3076\u3064\u5ddd\u300f\u3092\u898b\u306b\u884c\u304d\u305f\u3044\u2757<br \/>\n\u305f\u3063\u305f 13.5 m \ud83d\ude02\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\u6614\u304b\u3089\u3044\u308d\u3093\u306a\u300c\u73cd\u30b9\u30dd\u30c3\u30c8\u300d\u306b\u884c\u304f\u306e\u304c\u597d\u304d\u306a\u306e\u3067\u3059\u304c\u3001\u305d\u3046\u306a\u308b\u3068\u3084\u306f\u308a\u5199\u771f\u3092\u30d0\u30f3\u30d0\u30f3\u64ae\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u305d\u308c\u81ea\u4f53\u306f\u3044\u3044\u3053\u3068\u306a\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u4f55\u5e74 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10362\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Python \u3067\u5199\u771f\u304b\u3089\u4f4d\u7f6e\u60c5\u5831\u3092\u629c\u304d\u51fa\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u5206\u3051\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10382,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-10362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10362"}],"version-history":[{"count":7,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10362\/revisions"}],"predecessor-version":[{"id":10384,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10362\/revisions\/10384"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10382"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}