Introduction:
This article is a submission from the adorable Nannan♂ of 【DianDian GIS】, which has been sitting with me for half a month. If I don’t publish it soon, he might kill me. So without further ado, here is his article~
The original intention of writing this article was that manual clipping was too exhausting when clipping OSM, and I wanted to find a lazy method. (Editor’s note: Is laziness really the ladder of technological progress?)01Model Diagram
First, here is the model. Since only one iterator can be added in each Model Builder, sub-model nesting is required.
Figure 1|Main Model
Figure 2|Sub Model
02Model Details◐
Main Model
The main model is divided into three modules
Module 1:Create a file geodatabase (gdb) for each province and municipality.Module 2:Iterate through the selection of features from the administrative division (provincial level) data, using the selected features as input for the clipping sub-model’s “Clipping Features”; the “Iterative Feature Selection” iterator yields the “Value”, which corresponds to the district names (name field) in the administrative division feature data. Using inline variables, the names of each administrative division iterated will be used to name the created file geodatabase.Module 3:Input the clipping feature database as the iterative feature for the sub-model.Figure 3|Module Diagram◐
Sub Model
The sub-model is a classic batch clipping model that only clips feature classes under the GDB directory.Figure 4|Batch Clipping ModelSet the save path, osm.gdb, and input features as model parameters, thus adding the sub-model as a process to the main model. The parameters of the sub-model will automatically be added as variables in the main model.
Figure 5|Clipping Tool InterfaceThe working interface of the clipping model is shown in the figure,
Figure 6|Batch Clipping Tool Interface
The model parameters are as followsFigure 7|Model Parameter Settings
Run the main model, and the result is a GDB database named after each administrative division (due to the large data volume, I only ran a part of it and paused, which was taxing on my computer).
Figure 8|Result Naming Example
Figure 9|Running Interface 1
Figure 10|Running Interface 2
It is important to note that this model only clips directories under the gdb database, so the data to be clipped must be placed in the gdb database.
Author|Zawa Nannan
Layout|Moon
Proofreading|Data Reader
That’s all for today, feel free to leave comments for discussion.The text in the images should not be quoted without permission.
If possible, I hope you canshare, give alook and also give alike, and give areward~~ also welcomestandardized reprints~
I also hope everyone interacts with me more! (It is said that this can increase the probability of my posts appearing in your subscription account)
Recommended Historical Articles:
【Random Talk】How to Determine the “Real” Population Number, Distribution, and Flow?
【Random Talk】Distribution of Military Bases of the Lighthouse Country Worldwide
【Data Sharing】Importance of Ecological Service Functions and Sensitivity of China’s Ecosystems
【Data Organization】Data Updates and Sharing on Administrative Division Adjustments in 2019
【Data Sharing】How to Obtain AOI Data for Tourist Attractions in Beijing?
【Data Sharing】How to Obtain National Vector Subway Station and Line Data?
【Random Talk】Administrative Divisions with the Same Name Nationwide: Same Name for Cities and Counties (Revised and Supplemented)
【Random Talk】Administrative Divisions with the Same Name: Just a “Coincidence”
▼
We need your“share”and“look”
END>
If you needfull reprints of the article,submissions orcooperation
You can add WeChat
(Replies are very slow!!!)
(Please do not add me to ask various questions, I probably won’t know ==)
(Please make sure to note when joining the group)
(After adding, I will pass through during non-working hours in the evening, please be patient)
Official Account
▼ Click to read the original text and use keywords to search for historical articles