ArcGIS China surface coverage data GlobeLand30 preprocessing (batch projection, splicing, mask extraction) with finished product download

Schematic diagram of results:

GlobeLand30 is a 30 meter spatial resolution global surface coverage data. At present, there are three years of data available for download: 2000-2010-2020. This article mainly explains in arcgis10 6. Carry out the preprocessing operation of GlobeLand30 under the platform. The main preprocessing steps include: batch framing projection conversion, batch framing invalid value processing, batch frame splicing and data set mask extraction.

1, GlobeLand30 ArcGIS batch processing complete process

The preprocessing steps of GlobeLand30 mainly include: batch framing projection conversion, batch framing invalid value processing, batch frame splicing and data set mask extraction.

1. Batch projection conversion

Because the original data set uses UTM projection with 6 ° band, and the map frames span 11 bands from 43-53, it is necessary to convert all map frames first, and then carry out subsequent operations. In order to calculate the area accurately, this paper converts it into Albers equal product projection, and the geographic coordinate system is WGS1984.

Python source code:

Since the original dataset tiles are saved in different folders, the first step of batch projection transformation needs to traverse all folders under the root directory. The process is a little complicated. Starting from the second step, all processing results are saved in one folder to reduce the amount of code.

arcpy.ProjectRaster_management(raster,out, "PROJCS['MyAlbers',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Albers'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['central_meridian',105.0],PARAMETER['Standard_Parallel_1',25.0],PARAMETER['Standard_Parallel_2',47.0],PARAMETER['latitude_of_origin',0.0],UNIT['Meter',1.0]]", "NEAREST", cellsize , "", "", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")
    print str(n)+" rasters are processed !!!"

To view the projected coordinate system:

2. Batch processing invalid value

After the first step of projection, the black edge of the image still exists. This will the splicing processing result behind the image. The pixel value corresponding to the black edge is 0. Just set it to NoData. The corresponding tool is the SetNull function in the grid calculator. We continue to use Python batch processing.

Python source code:

for inRaster in inRasters:
    ##print outRaster
    print "Processing "+inRaster +" ......"
    outSetNull = SetNull(inRaster,inRaster,WhereClause)
print str(n)+" rasters are processed!"


Processing results:

3. Batch map splicing

There are two tools for splicing grid view frames in ArcGIS: [mosaic] and [mosaic to new grid]. Of course, you need to add data manually. Fortunately, our data is in the same folder, you can directly select and drag them all. Of course, you can also write Python code to complete them.

Method 1: use the [mosaic to new grid] tool

Method 2: Python code

arcpy.MosaicToNewRaster_management(str, outPath, outName, "", "8_BIT_UNSIGNED", "", "1", "LAST", "FIRST")


It should be noted that the original data set is in tif format, and each view frame has a pyramid, which is fast to load and display, but the pyramid will be lost after SetNull, and the loading speed is very slow.

4. Add classification field and assign value

Open the attribute table, add a text field type, open the editor, enter the classification name and save it.

5. Mask extraction

Use the [extract by mask] tool to extract according to the scope of the study area.

Color matching reference value:

Note: the spliced data set has pyramids, but the pyramids will be lost after using the [extract by mask] tool. The pyramids must be rebuilt, otherwise the loading speed is extremely slow.

2, GlobeLand30 finished product data download

Please send a private letter to the original author.

Copyright notice: This article is the original article of CSDN blogger "Liu Yige GIS", which follows the CC 4.0 BY-SA copyright agreement. For reprint, please attach the source link of the original text and this notice.
Original link:

Keywords: gis arcgis

Added by theblacksheep on Tue, 08 Feb 2022 00:34:34 +0200