ããã¯FOSS4G Advent Calendar 2017 24æ¥ç®ã®è¨äºã§ãã
ããã£ã±ãå±±ãã¨ã¯ããã£ã±ãã®å½¢ãããå±±ï¼è±ï¼breast-shaped hillï¼ã®ãã¨ã§ããï¼åºå
¸ï¼ Wikipediaï¼
ä»åã¯çµ±è¨ã½ãããRãã使ã£ã¦åå°ã®ãã£ã±ãå±±ãåæãã¦ã¿ããã¨æãã¾ãã
ãªãããããªãã¨ãããã ã£ã¦ï¼
ããã«ãã£ã±ãå±±ãããããã
ï¼ã¸ã§ã¼ã¸ã»ãããªã¼ï¼
ã¾ãã¯ããã£ã±ãå±±ãæ¢ãæããã§ããå°çé¢å°å³ã®æ¤ç´¢æ©è½ãå©ç¨ãã¦ã¿ã¾ãããã
æ¤ç´¢çªã«"ãã£ã±ãå±±"ã¨å
¥åãã¦ã¿ã¾ãã
ããããªããã0件ãè¦ã¤ããããæ±å¤§ã®ååãååã°ãã¨è¨ã£ãçµæã¨ãªãã¾ãã...
ä»æ¹ãªãã®ã§ã°ã°ã£ã¦ãã¼ã¿ãéãã¾ãããæ½å¨çãªãã£ã±ãå±±ã¯ãã£ã¨ããã¯ãã§ããããªããªã表ã«åºã¦ããªãããã§ãã
ãã¼ã¿ï¼https://gist.github.com/tmizu23/29c24df1662bbf976e2407f843f43c15
area | name | lat | lon |
---|---|---|---|
åæµ·éä¸å£«å¹çº | 西ã¯ããã·ãªãã±ãããªããå²³ | 43.524422 | 143.229961 |
岩æçå «å¹¡å¹³å¸ | ä¸æé¨å±± | 40.070009 | 141.107197 |
ç¦å³¶çé¡å±±å¸ | å®é太è¯å±± | 37.621130 | 140.287864 |
ç¦å³¶ç天æ æ | äºå²å±± | 37.247941 | 139.965477 |
æ±äº¬é½å°ç¬ åææ¯å³¶ | ä¹³æ¿å±± | 26.659560 | 142.161412 |
æ±äº¬é½å°ç¬ åæç¶å³¶ | ä¹³é å±± | 27.096348 | 142.210046 |
å¼ççå°å·çº | ç¬ å±± | 36.018509 | 139.189873 |
山梨çç²åºå¸ | è¦å®³å±± | 35.703142 | 138.599333 |
åºå³¶çå®è¸å¤ªç°çº | 574ãã¼ã¯ | 34.583811 | 132.211576 |
æ²ç¸çå®®å¤å³¶å¸ | 69.1ãã¼ã¯ | 24.750397 | 125.405974 |
ãã£ã±ãå±±ã®å¯è¦å
ãã¼ã¿åæã®åºæ¬ã¯å¯è¦åã§ãã
ãããã®ãã£ã±ãå±±ãRã¨å°çé¢ã¿ã¤ã«ãå©ç¨ãã¦ãå¯è¦åãã¦ã¿ã¾ãããã
å°çé¢ã¿ã¤ã«ãRã§èªã¿è¾¼ããããã«ベクトルタイル Advent Calendar 2017 16日目の記事ã§ä½æããã³ã¼ããæ¹é ãã¾ãããæå®ããç¯å²ã®ç»åã¿ã¤ã«ãPNGæ¨é«ã¿ã¤ã«ããã¦ã³ãã¼ãããRasterã¯ã©ã¹ã«æ ¼ç´ããã®ã§ã表示ã»åæã«å©ç¨ã§ãã¾ãã
ã³ã¼ãï¼https://github.com/tmizu23/gsitiles.R
使ãæ¹
æåã«ã以ä¸ã®Rã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
install.packages(c("raster", "curl", "png", "jpeg", "spatialEco"),dependencies=T)
é¢æ°ãsource("gsitiles.R")ã§èªã¿è¾¼ãã§ããããããªæãã§ä½¿ç¨ãã¾ãã
#使ç¨ä¾ source("gsitiles.R") #æ¨é«ãã¼ã¿ãåå¾ã»è¡¨ç¤ºã»æå½±å¤æã»æ¸ãåºã dem<-getTile(137.665215,36.294582,137.7,36.314582,15,type="dem5a") plot(dem) demUTM53<-projectRaster(dem, crs=CRS("+init=epsg:3099")) writeRaster(demUTM53,"demUTM53.tif") #æ¨æºå°å³ã¨CSç«ä½å³ãä¹ç®åæã»è¡¨ç¤ºã»geoTIFFæ¸ãåºã cs<-makeCS(dem,shaded=TRUE) stdmap<-getTile(137.665215,36.294582,137.7,36.314582,15,type="std") stdmap_cs<-overlayColor(stdmap,cs,type="multiply") plotRGB(stdmap_cs) writeRaster(stdmap_cs,"stdmap_cs.tif",datatype="INT1U") #datatypeãæå® #é°å½±èµ·ä¼å³ã®ä½æã»è¡¨ç¤º slope<-terrain(dem,"slope") aspect<-terrain(dem,"aspect") shade<-hillShade(slope,aspect) plot(shade,col=grey(0:100/100),legend=F) #èªç©ºåçã¨é°å½±èµ·ä¼ãéé表示 photo<-getTile(137.665215,36.294582,137.7,36.314582,15,type="photo") plot(shade,col=grey(0:100/100),legend=F) plotRGB(photo,alpha=180,add=T)
- getTileé¢æ°ã§åå¾ãããç¯å²ã®å·¦ä¸ã¨å³ä¸ã®åº§æ¨ããºã¼ã ã¬ãã«ãã¿ã¤ã«ã®ç¨®é¡ãæå®ãã¾ããï¼å·¦ä¸ã¨å³ä¸ã®åº§æ¨ãåãå ´åã¯ããã®åº§æ¨ãå«ã1ã¿ã¤ã«ãåå¾ãã¾ããï¼
- ã¿ã¤ã«ã®ç¨®é¡ã¯ãæ¨æºå°å³ï¼"std"ãã·ã¼ã ã¬ã¹ãã©ãï¼"photo"ãæ¨é«PNGï¼"dem10b","dem5a","dem5b"ãé¸æã§ãã¾ããæä¾ããã¦ãããºã¼ã ã¬ãã«ã¨ç¯å²ã¯ã地理院タイルのページãåç §ãã ããã
- crop=TRUEãæå®ããã¨ãæå®ç¯å²ã§åãæãã¾ããããã©ã«ã(FALSE)ã§ã¯ãæå®ç¯å²ãå«ãã¿ã¤ã«ã®ç¯å²ã«ãªãã¾ãã
ãã®ä»ã«ä»¥ä¸ã®é¢æ°ãç¨æãã¾ããã
- makeCS(dem,shaded=TRUE)ï¼
ãããæ¨é«ãã¼ã¿ããCSç«ä½å³ãä½æãshaded=TRUEã§é°å½±èµ·ä¼å³ã¨ãªã¼ãã¬ã¤åæããCSç«ä½å³ãä½æ
- overlayColor(stackA,stackB,type="overlay | multiply")ï¼
ãããRGBå¤ã®å ¥ã£ãstackã¯ã©ã¹å士ãç»ååæã種é¡ã¯ããªã¼ãã¬ã¤åæï¼"overlay"ãä¹ç®åæï¼"multiply"ãï¼stackAã¨stackBã¯åãç¯å²ããºã¼ã ã¬ãã«ã®å¿ è¦ãããã¾ãï¼
CSç«ä½å³ã«ã¤ãã¦ã¯ããã¡ãã®è¨äºãåèã«ããã¦é ãã¾ããã
http://waigani.hatenablog.jp/entry/2017/12/03/225834
https://qiita.com/frogcat/items/7e91d3070a7a8d3e2c94
ãã£ã±ãå±±ã®å¯è¦å
åç½®ããé·ããªãã¾ããããå¯è¦åã®çµæã¯ãã¡ãã§ãã
æ¥æ¬ã代表ãããã£ã±ãå±±ã§ãã両ãã¼ã¯ã«ååãä»ãã¦ããã®ãç¹å¾´ã§ãã
ãªããªãã®è¯åã§ãããã£ã±ãå±±ã¨ãã¦æå¥ã¯ããã¾ããã
æ¥æ¬ç¾åå±±ããã®ã¨ã³ããªã¼ã§ããçä¹³ãªãããä¹³é ã®ãªã¢ãªãã£ã追æ±ãã¦ãã¾ãã
ãã³ã«ããæ¿ããä½ãã主張ãã¦ãã¾ãããã£ã¨ãªã¹ãã¯ãããã¦ãè¯ãããããã¾ããã
æ¯å³¶ã®ãã£ã±ãå±±ã§ããããã¹ããã¦ãããå¿
ç¶ã®çµæã§ãã
ç¶å³¶ã®ãã£ã±ãå±±ã§ããç¶ã«ãä¹³ã¯ãããã§ãã
å°å
ã§ã¯åãç¥ããã¦ãããå¢æããªãã伸ã³ããã«æå¾
ã§ãã
å²è·¡ã¨ä¸ä½ã¨ãªã£ãå¦éºãªãã£ã±ãå±±ã§ããèªããããæãã¾ããã
ä¸è¦ãå¤å²ããªãã¤ã¾ããªããããã§ãããã§ãã
è¨ããã¨ãããã¨ã¯åãããã§ããã§ãå±éºã¨è£è
¹ãªæããããããã¾ãã
ã¾ã¨ã
å°çé¢ã¿ã¤ã«ã¨Rã§ããã£ã±ãå±±ã®å¯è¦åãç°¡åã«ã§ããããã«ãªãã¾ããã
ããããªãããæã
ãçºãã¹ããã¨ã¯å±±ç©ã¿ã§ãã
ã©ã®ããã«ãã¦ããã£ã±ãå±±ãã§ããã®ãï¼
ãªãããã£ã±ãå±±ã¯ããã«ããã®ãï¼
ããããããã£ã±ãå±±ã¯ã©ããªã£ã¦ããã®ãï¼
ãã£ã±ãå±±ã®é ãç®æãããããããä¸æ©ä¸æ©ç»ã£ã¦ããããã¨æãã¾ãã
ããã§ã¯ãè¯ãã¯ãªã¹ãã¹ãï¼