포인트 데이터의 모양 파일로 시작했습니다. 필자는 spatstat 함수를 사용하기 위해이 형식을 ppp 형식으로 변환했습니다.이미지를 지오 티프로 변환 R
sp_points_df_al <- rgdal::readOGR(dsn = shape_path, layer = "aland_points")
# convert the spatial points data.frame to just plain ol spatial points
sp_points_al <- as(sp_points_df_al, "SpatialPoints")
# now convert the spatial points to ppp
ppp_al <- as(sp_points_al, "ppp")
# estimate the window from the points data
wind_rr <- spatstat::ripras(ppp_al)
ppp_al_constr <- spatstat::ppp(ppp_al$x, ppp_al$y, window = wind_rr)
그때 어떤 점 패턴 분석을하고 싶어하고 그래서 다음 spatstat 기능 사용 :
image <- spatstat::density.ppp(ppp_al_constr, sigma = 0.004, dimyx=c(512, 512))
내가 다음 이미지를 표시를
이 작업을 수행하는 코드는 아래와 같습니다 다음을 사용하여 :
bias_palette <- colorRampPalette(c("blue", "magenta", "red", "yellow", "white"), bias=2, space="Lab")
spatstat::plot.im(k, col=bias_palette(256), ribbon = FALSE)
내가 원하는 것은 다음으로부터 지오 매트 이미지를 생성하는 것입니다. 위. 일부 벡터 데이터 위에 tiff 이미지를 겹치기를 원할 때이 작업을 수행하려고합니다.
내 질문은 :
가 어떻게이 Geotiff 형식으로 위의 이미지를 변환합니까 ...?
이 코드는 코드에서 테스트 할 수 없지만이 링크는 http://neondataskills.org/R/Image-Raster-Data-In-R/을 도움이 될 수 있습니다. – Nishad