Geospatial Clipping: “Clipping” a Database

0

 


In this article you will learn how to clip all the features (or shapefiles, as you prefer to call them) contained in a database, based on a given geographic extent.  



The common practice when talking about clipping a layer involves the use of the “Clip” tool in ArcGIS, where a layer is used as a boundary to define the clipping. However, this can be inefficient when trying to clip all layers of a database.


The following procedure will be useful, especially when you need to clip spatial information considering a box. I use it to crop the cartography to the extent of my Dataframe, thus avoiding information gaps in the spatial region presented. Another advantage is that in the end only the data necessary for the study remains, eliminating any surplus and thus reducing the size of the information handled.  


To achieve this, we will use a little known toolbar of ArcGIS (ArcMap), called Distributed Geodatabase. The steps to follow are as follows:


How to use Distributed Geodatabase to clip multiple features contained in a spatial database (File geodatabase .gdb or Personal geodatabase .mdb).


1. Create a file geodatabase or personal geodatabase. To do this, go to the “ArcCatalog” or “Catalog” tab within ArcMap from the “Standard” toolbar (a), locate the folder where you want to save the clipped database (b), right click and select “New” (c), and then select “File Geodatabase” (d). This will create a database called “New File Geodatabase.gdb”, which for this example has been renamed CLIP (e).


Creación de una nueva base de datos



2. Create a layer group in a blank MXD file and unmap it. This will prevent the program from crashing due to the number of layers loaded at the same time. Then, load all the information from the database into the layer group as shown in the following sequence of images.


Aprende a crear un grupo de capas en un archivo MXD en blanco en ArcGIS y desmarcarlo para prevenir fallos por sobrecarga de capas. Sigue nuestra guía paso a paso para cargar información de la base de datos eficientemente y mantener tu proyecto organizado



3. Right click on the ArcMap menu bar (a), select the “Draw” button (b), on the “Draw” toolbar, select the “Rectangle” command (c) and proceed to define the geographic extent to be cropped with a drawing box (d). Make sure that the box is selected (e).


Aprende a definir una extensión geográfica en ArcMap con nuestra guía paso a paso. Descubre cómo acceder a la barra de herramientas 'Draw', seleccionar el comando 'Rectangle' y recortar áreas específicas en tu mapa. Asegúrate de que el cuadro de dibujo esté seleccionado para completar el proceso correctamente


4. Right click on the ArcMap menu bar (a), select the 'Distributed Geodatabase' button (b) and click the 'Extract Data' button (c) in the newly displayed toolbar.


Descubre cómo extraer datos en ArcMap con la herramienta 'Extract Data'. Aprende a acceder a la opción 'Distributed Geodatabase' desde la barra de menú y a utilizar la barra de herramientas desplegada para realizar la extracción de datos de manera eficiente. Sigue nuestra guía paso a paso para optimizar tu flujo de trabajo en ArcMap.



5. A window called 'Extract Data Wizard' will be displayed, select the 'Open geodatabase' button (a) and choose the new database where the clipped data will be stored, the same as in step 1. Make sure all options are selected as shown in views 1, 2 and 3.



Aprende a utilizar la ventana 'Extract Data Wizard' en ArcMap para almacenar información recortada en una nueva geodatabase. Selecciona el botón 'Open geodatabase' y elige la base de datos deseada, asegurándote de que todas las opciones estén configuradas correctamente como se muestra en las vistas 1, 2 y 3. Sigue nuestra guía detallada para optimizar el proceso de extracción de datos.



At the end of the process, you will have the trimmed data in the database created in step 1. Below is the before and after:



BEFORE:



Muestra grafica del ejemplo antes del recorte geoespacial


AFTER:


Muestra grafica del ejemplo despues del recorte geoespacial



As you can see, this is not a geometric cut, but everything that is overlapped by the drawn rectangle is copied to the target database keeping its original shape. If you need to cut a database geometrically with a layer, I recommend you to review my article PYTHON GIS - Geometrically clip all features contained in a database.


I hope you enjoyed this article. Soon, I will upload a video explaining the procedure that you will be able to check in this blog. Save my blog among your favorite links, where I will be sharing many more tricks of this style. Remember that you can send me your questions through the contact page or leave your comment; I will be attentive to answer.

You may like these posts

No comments