小编Alb*_*ami的帖子

R-在城市地图上拟合网格并将数据输入到网格正方形中

我试图像这样在圣何塞上放置网格:

圣何塞网格

您可以使用以下代码直观地制作网格:

  ca_cities = tigris::places(state = "CA") #using tigris package to get shape file of all CA cities

  sj = ca_cities[ca_cities$NAME == "San Jose",] #specifying to San Jose

  UTM_ZONE = "10" #the UTM zone for San Jose, will be used to convert the proj4string of sj into UTM

  main_sj = sj@polygons[[1]]@Polygons[[5]] #the portion of the shape file I focus on. This is the boundary of san jose

  #converting the main_sj polygon into a spatialpolygondataframe using the sp package
  tst_ps …
Run Code Online (Sandbox Code Playgroud)

r raster spatial geospatial r-sp

4
推荐指数
1
解决办法
879
查看次数

标签 统计

geospatial ×1

r ×1

r-sp ×1

raster ×1

spatial ×1