Add-in plug-in Development For Dislocated Water System Extraction¶
Abstract¶
Earthquake is the Earth's greatest threat to humans and animals, the highest threat, the most destructive, the most powerful natural disasters. There are numerous reasons for the earthquake, but the main reason is because the crustal movement and internal changes in the Earth led to the earth between the various plates squeeze, collision, so that part of the contact area has been broken and dislocation. It not only poses a great threat to all kinds of creatures, including mankind, but also brings significant economic losses. According to the research of scientists in various countries, it is found that: 1) a large number of seismic fossils coincide with the fault zone in the vicinity of the earthquake; 2) So far, the new fault zone formed by the large earthquake caused by the devastating strike is associated with the area 3) If the study time is stretched to several hundred or even thousands of years, you will find a large number of active fault areas have occurred several times the earthquake; 4) most of the strong earthquake fault with the local (5) Through the mechanical analysis of the source, we can find that the surface fault and the vast majority of the source of the fault surface has a striking similarity. Therefore, the ArcGIS add-in plug-in can be utilized to extract the information of the fault-fault water profile quickly by using ArcGIS Engine technology in ArcGIS. It can extract the profile information quickly, accurately and efficiently from the precise DEM image of the fault-broken water system area. So as to enable the staff to quickly, accurately and efficiently obtain the profile data and improve the efficiency of the research and analysis. This is of profound significance for the geographer to analyze the movement law of the active fault and the seismic repetition rate.
- Keywords : active fault; offset river; DEM; profile extraction; add-in
Research Question:¶
- Focus: Development of an ArcMap add-in plugin for extracting profile information from offset river systems using high-resolution DEM.
- Study Area: The research specifically targets the San Andreas Fault in the Carrizo Plain, California, USA.
UI and feature of developed Toolbox¶
The provided text describes the interface of the Add-in and its features:
- River Course Auxiliary Line Drawing Tool: This tool allows users to sketch preliminary auxiliary lines indicating the course of the offset rivers on the DEM, laying the foundation for subsequent functions.
- Parameter Setting Button: Users can set parameters for generating cross-sectional lines.
- Cross-sectional Line Generation Button: Generates cross-sectional lines based on previously set parameters.
- Lowest Point Display Button: The plugin displays the lowest point of each cross-section.
- River Valley Course Line Search Button: Connects the lowest points of each cross-section to construct a line close to the actual course of the river system.
- Profile Information Chart Display Button: Generates and displays a profile information chart based on user selection.
Case Study¶
Calculating Results¶
- The study began by decompressing the acquired LAS point cloud data files and opening them with ArcGis 10.0 or later versions (as ArcMap cannot directly open LAS point cloud data, it requires creating a new LAS dataset and importing the data files into it to display the LiDAR images).
- Image 1: Create new LAS datasets
- Image 2: Load Lidar data into LAS datasets
- Image 1: Create new LAS datasets
- Next, ArcMap's in-built "Conversion Tools" were used to transform the LAS point cloud dataset into the required DEM data, which was then saved in TIF format.
- Image 3: Transfer LAS data to Raster
- Image 4: Parameter Setting
- Image 5: DEM data getting:
- Image 3: Transfer LAS data to Raster
- Finally, the study's developed Add-in plugin was loaded. It involved using tools to draw an approximate course of the river in the selected area, setting parameters for profile information extraction, and obtaining the river's cross-sectional profile. The plugin automatically searched and displayed the lowest point of the water body and connected these points. The profile information was then displayed, showing the results as illustrated.
- Image 6: Calculate the waster bottom surface using tools:
- Image 6: Calculate the waster bottom surface using tools:
Performance Assessing¶
The study compared the profile information of Wallace Creek obtained using the Add-in plugin with the manually drawn profile information by Japanese scholar Ouchi. The plugin's data, derived from LAS point cloud data, had higher precision compared to Ouchi's hand-drawn data. Differences in the lowest points found, time of data collection, and precision were analyzed. Despite some variations, the overall trend of the profile information obtained from the plugin was consistent with Ouchi's field data. This confirmed the reliability of the plugin's data.
- Correlation between our result and field calculation results from Scholar Ouchi
Source Code with download link¶
- Note: This program is further developed based on Ma Wentao's version. Here, only some differences and new additions are listed. For more details, refer to Ma Wentao's master's thesis titled "Design and Implementation of an Add-in Plugin for Extracting Profile Information of Active Fault Offset River Systems Based on High-Resolution DEM", Yunnan University, 2015.
Function 1: Config.Designer.cs Modifications¶
// Added References
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.DataSourcesRaster;
// Modification in Public Variables
// Removed the definition for FileName.
// Changed and Added Properties/Functions
public static bool IsRasterLayer
{
get
{
if (Application != null)
{
if (Application.Document == null) return false;
try
{
return ((Application.Document as IMxDocument).FocusMap.get_Layer(0) is IRasterLayer);
}
catch
{
return false;
}
}
return false;
}
}
public static IRasterLayer TheRasterLayer
{
get
{
if (IsRasterLayer)
{
return ((Application.Document as IMxDocument).FocusMap.get_Layer(0) as IRasterLayer);
}
return null;
}
}
Function 2: AddLowestPointsClass.cs Error Handling¶
// Added Error Handling
if (list_NormalPolyline == null) return;
if (!Directory.Exists(ArcMap.FileLocation))
{
MessageBox.Show("Path("+ArcMap.FileLocation+") not Exist,Please run setting","Warning");
return lowestPoint;
}
Function 3 & 5: DrawLowestPolylineClass.cs Modifications¶
// Added Code Snippets for Raster Layer Checks and Error Handling
// Checks if the raster layer is present and handles file existence.
// Additional Error Handling for Polyline
if (pPolyline != null && pPolyline.IsEmpty != true)
{
// Code continues...
}
else
{
MessageBox.Show("No Polyline found!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
// Modified the condition to check total segments
if (planeNumber < totalSegments)
{
// Code continues...
}
Function 6: SettingForm.cs Updates¶
// Added References
using System.IO;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesRaster;
// Added Error Handling and Processing
else
{
txtLocation.Text = Application.StartupPath.Trim() + @"\map_project";
// Path Existence Check and Error Handling
}
Function 7: SettingForm.Designer.cs Changes¶
// UI Element Modification
this.btnGrid.Click += new System.EventHandler(this.btnGrid_Click);
// Code for btnGrid event handler
private void btnGrid_Click(object sender, EventArgs e)
{
// Folder selection and validation logic
}
Function 8: SharedSnippet.cs Additions¶
// Added Processing and Error Handling
IRasterLayer pRasterLayer = ArcMap.TheRasterLayer;
if (pRasterLayer.BandCount == 0)
{
return -1;
}
// Raster Layer Checks and Dataset Assignments