{"id":6254,"date":"2018-12-22T09:30:54","date_gmt":"2018-12-22T00:30:54","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=6254"},"modified":"2022-08-03T11:25:32","modified_gmt":"2022-08-03T02:25:32","slug":"gee%e5%85%a5%e9%96%80-%e3%83%90%e3%83%b3%e3%83%89%e9%96%93%e6%bc%94%e7%ae%97%e3%82%92%e8%a1%8c%e3%81%86","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/googleearthengine\/6254","title":{"rendered":"[Google Earth Engine\u5165\u9580] \u30d0\u30f3\u30c9\u9593\u6f14\u7b97\u3092\u884c\u3046"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>\u30a4\u30e1\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eexpression\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u3001\u885b\u661f\u753b\u50cf\u306e\u30d0\u30f3\u30c9\u5024\u3092\u8a08\u7b97\u5f0f\u3092\u7528\u3044\u3066\u8a55\u4fa1\u3057\u3001\u6f14\u7b97\u7d50\u679c\u3092\u65b0\u305f\u306a\u30a4\u30e1\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u6b63\u898f\u5316\u6c34\u6307\u6570\u3084\u6b63\u898f\u5316\u690d\u751f\u6307\u6570\u306a\u3069\u306e\u30a4\u30e1\u30fc\u30b8\u6307\u6570\u3092expression\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u6f14\u7b97\u3057\u3001\u5730\u56f3\u3078\u30aa\u30fc\u30d0\u30fc\u30ec\u30a4\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>\u30a4\u30e1\u30fc\u30b8\u6307\u6570\u306f\u3001\u30de\u30eb\u30c1\u30d0\u30f3\u30c9\u306e\u753b\u50cf\u304b\u3089\u8a08\u7b97\u3055\u308c\u305f\u753b\u50cf\u3067\u3059\u3002\u753b\u50cf\u306f\u3001\u753b\u50cf\u5185\u306b\u5b58\u5728\u3059\u308b\u7279\u5b9a\u306e\u73fe\u8c61\u3092\u5f37\u8abf\u3059\u308b\u4e00\u65b9\u3067\u3001\u305d\u306e\u5f71\u97ff\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u305d\u306e\u4ed6\u306e\u8981\u56e0\u3092\u8efd\u6e1b\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u690d\u751f\u6307\u6570\u3067\u306f\u3001\u5065\u5eb7\u306a\u690d\u751f\u306f\u6307\u6570\u753b\u50cf\u306b\u660e\u308b\u304f\u8868\u793a\u3055\u308c\u3001\u5065\u5eb7\u3067\u306a\u3044\u690d\u751f\u306f\u5024\u304c\u4f4e\u304f\u3001\u8352\u308c\u5730\u306e\u30c6\u30ec\u30a4\u30f3\u304c\u6697\u304f\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div style=\"text-align: right; font-size: 0.9em;\"><a href=\"https:\/\/pro.arcgis.com\/ja\/pro-app\/help\/data\/imagery\/indices-gallery.htm\">\u6307\u6570\u30ae\u30e3\u30e9\u30ea\u30fc\u2014ArcGIS Pro | ArcGIS Desktop<\/a><\/div>\n<\/blockquote>\n<h2>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30ed\u30fc\u30c9<\/h2>\n<pre class=\"lang:js decode:true \">\/\/\u4f4d\u7f6e\u3092\u6307\u5b9a\nvar point = ee.Geometry.Point([139.41128393528618, 35.76928898000714]);\n\/\/\u6307\u5b9a\u3057\u305f\u4f4d\u7f6e\u3078\u5730\u56f3\u3092\u79fb\u52d5\u3059\u308b\nMap.centerObject(point, 10)\n\n\/\/\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30ed\u30fc\u30c9\nvar dataset = ee.ImageCollection('LANDSAT\/LC08\/C01\/T1_RT_TOA')\n                  .filterDate('2018-01-01', '2018-12-31')\n                  .filterBounds(point)\n\nvar img = dataset.first();<\/pre>\n<h2>expression\u306e\u57fa\u672c<\/h2>\n<p>expression\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u8a55\u4fa1\u5f0f\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u8a18\u8ff0\u3057\u3001\u5f0f\u306e\u4e2d\u3067\u4f7f\u7528\u3059\u308b\u5909\u6570\u306b\u30d0\u30f3\u30c9\u5024\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u3053\u3068\u3067\u6f14\u7b97\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \">var newImage = img.expression(\n    '\u8a55\u4fa1\u5f0f(\u6587\u5b57\u5217)',\n    {\n        \u5f0f\u3067\u4f7f\u7528\u3059\u308b\u5909\u6570: \u9069\u7528\u3059\u308b\u5024,\n    });\n\nprint(newImage);\n<\/pre>\n<p>\u6f14\u7b97\u7d50\u679c\u306f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u8fd4\u3063\u3066\u304d\u307e\u3059\u304c\u3001\u6f14\u7b97\u7d50\u679c\u304c\u53ce\u3081\u3089\u308c\u3066\u3044\u308b\u30d0\u30f3\u30c9\u540d\u3092\u4efb\u610f\u306b\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u304c\u306a\u3044\u3089\u3057\u3044\u306e\u3067print\u6587\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n\uff08\u4eca\u306e\u3068\u3053\u308d\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306b\u3082\u8f09\u3063\u3066\u3044\u306a\u3044\uff09<\/p>\n<h2>\u6b63\u898f\u5316\u6c34\u6307\u6570\u3092\u8a08\u7b97\u3059\u308b<\/h2>\n<blockquote><p>\u5730\u8868\u9762\u306b\u304a\u3051\u308b\u6c34\u306e\u5b58\u5728\u3068\u6df1\u3044\u95a2\u9023\u3092\u3082\u3064\u6307\u6a19\u306e1\u3064\u3067\u3001\u8d64\u6ce2\u9577\uff08R\uff09\u3068\u4e2d\u9593\u8d64\u5916\u6ce2\u9577\uff08SWIR\uff09\u3092\u7528\u3044\u3066\u3001(R-SWIR)\/(R+SWIR)\u3067\u8a08\u7b97\u3055\u308c\u308b\u3002NDWI\u304c\u9ad8\u3044\u3068\u304d\u306f\u8868\u9762\u304c\u5e2f\u6c34\u72b6\u6cc1\u306b\u3042\u308b\u3068\u5224\u65ad\u3055\u308c\u308b\u3002<\/p>\n<div style=\"text-align: right;\"><a href=\"http:\/\/occco.nies.go.jp\/yougo\/ndwi.html\">\u6b63\u898f\u5316\u6c34\u6307\u6570<\/a><\/div>\n<\/blockquote>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/strong><\/p>\n<pre class=\"lang:js decode:true \">\/\/\u6b63\u898f\u5316\u6c34\u6307\u6570\uff1aNormalized Difference Water Index\uff09\n\/\/ NDWI \uff1d \uff08\u8d64\u6ce2\u9577\uff0d\u77ed\u6ce2\u9577\u8d64\u5916\u6ce2\u9577\uff09\/\uff08\u8d64\u6ce2\u9577\uff0b\u77ed\u6ce2\u9577\u8d64\u5916\u6ce2\u9577\uff09\nvar NDWI = img.expression(\n    '(red - swir) \/ (red + swir)',\n    {\n        red: img.select('B4'),\n        swir: img.select('B6')    \n    });\n\n\/\/ Open Water Index\n\/\/ OWI \uff1d \uff08\u7dd1\u6ce2\u9577\uff0d\u77ed\u6ce2\u9577\u8d64\u5916\u6ce2\u9577\uff09\/\uff08\u7dd1\u6ce2\u9577\uff0b\u77ed\u6ce2\u9577\u8d64\u5916\u6ce2\u9577\uff09\nvar OWI = img.expression(\n    '(green - swir) \/ (green + swir)',\n    {\n        swir: img.select('B6'),    \n        green: img.select('B3')    \n    });\n\n\n\/\/NDWI, OWI\u3092\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\nvar NDWICOLOR = {\n  \"opacity\":1,\n  \"bands\":[\"B0\"],\n  \"min\":-0.7421127557754517,\n  \"max\":0.4728425443172455,\n  \"palette\":[\"ff0000\",\"efff00\",\"27ff00\",\"00ffdb\",\"0013ff\"]\n\n}\n\n\n\/\/\u540c\u3058\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u8a2d\u5b9a\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u30d0\u30f3\u30c9\u30cd\u30fc\u30e0\u3092\u5909\u66f4\nNDWI = NDWI.select([\"B4\"], [\"B0\"])\nOWI = OWI.select([\"B3\"], [\"B0\"])\n\n\nMap.addLayer(NDWI, NDWICOLOR, \"NDWI\");\nMap.addLayer(OWI, NDWICOLOR, \"OWI\");\n<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-6255 border\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndwi-1024x635.png\" alt=\"google earth eingine ndwi\" width=\"680\" height=\"422\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndwi-1024x635.png 1024w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndwi-242x150.png 242w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndwi-768x476.png 768w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndwi.png 1904w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<h2>\u6b63\u898f\u5316\u690d\u751f\u6307\u6570\u3092\u8a08\u7b97\u3059\u308b<\/h2>\n<blockquote><p>\u690d\u751f\u6307\u6a19\u3068\u306f\u3001\u690d\u7269\u306b\u3088\u308b\u5149\u306e\u53cd\u5c04\u306e\u7279\u5fb4\u3092\u751f\u304b\u3057\u885b\u661f\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u7c21\u6613\u306a\u8a08\u7b97\u5f0f\u3067\u690d\u751f\u306e\u72b6\u6cc1\u3092\u628a\u63e1\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u8003\u6848\u3055\u308c\u305f\u6307\u6a19\u3067\u3001\u690d\u7269\u306e\u91cf\u3084\u6d3b\u529b\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div style=\"text-align: right;\"><a href=\"http:\/\/www.gsi.go.jp\/kankyochiri\/ndvi.html\">\u690d\u751f\u6307\u6a19\u30c7\u30fc\u30bf\u306b\u3064\u3044\u3066\uff5c\u56fd\u571f\u5730\u7406\u9662<\/a><\/div>\n<\/blockquote>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/strong><\/p>\n<pre class=\"lang:js decode:true \">\/\/ \u6b63\u898f\u5316\u690d\u751f\u6307\u6570\uff1aNormalized Difference Vegetation Index\n\/\/ NDVI\uff1d \uff08\u8fd1\u8d64\u5916\u6ce2\u9577\uff0d\u8d64\u6ce2\u9577\uff09\/\uff08\u8fd1\u8d64\u5916\u6ce2\u9577\uff0b\u8d64\u6ce2\u9577\uff09\nvar NDVI = img.expression(\n    '(nir - red) \/ (nir + red)',\n    {\n        nir: img.select('B5'),    \n        red: img.select('B4')    \n    });\n\n\/\/NDVI\u3092\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\nvar NDVICOLOR = {\n  bands: [\"B0\"],\n  max: 0.7188666462898254,\n  min: -0.5202493667602539,\n  opacity: 1,\n  palette: [\"0036ff\",\"ff58e2\",\"efff00\",\"05ff19\"]\n}\n\n\/\/\u30d0\u30f3\u30c9\u30cd\u30fc\u30e0\u3092\u5909\u66f4\nNDVI = NDVI.select([\"B5\"], [\"B0\"])\n\nMap.addLayer(NDVI, NDVICOLOR,  \"NDVI\");\n\n<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-6256 border\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndvi-1024x631.png\" alt=\"google earth enginge ndvi\" width=\"680\" height=\"419\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndvi-1024x631.png 1024w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndvi-243x150.png 243w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndvi-768x473.png 768w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2018\/12\/ndvi.png 1907w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<h2>\u30a2\u30c9\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc<\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001<a href=\"https:\/\/qiita.com\/advent-calendar\/2018\/googleearth?fbclid=IwAR3kO5kBRJhrwyYPkmMUBPk1IAAu-pJupq9ip_N1KZ8joHdfPDlTEPTM3tE\">Google Earth \/ Google Earth Engine Advent Calendar 2018<\/a>\u3078\u306e\u53c2\u52a0\u6295\u7a3f\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u30a4\u30e1\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eexpression\u30e1&hellip;<\/p>\n","protected":false},"author":1,"featured_media":6256,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[76],"tags":[],"class_list":["post-6254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-googleearthengine","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/6254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=6254"}],"version-history":[{"count":2,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/6254\/revisions"}],"predecessor-version":[{"id":7965,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/6254\/revisions\/7965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/6256"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=6254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=6254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=6254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}