Posts

Showing posts from June, 2021

Working with Rasters In ArcPy

Image
Today is About Rasters... What is a raster? In its simplest form, a raster consists of a matrix of cells (or pixels) organized into rows and columns (or a grid) where each cell contains a value representing information, such as temperature. Rasters are digital aerial photographs, imagery from satellites, digital pictures, or even scanned maps. - Esri Raster are images to explain surfaces and geospatial data such as elevation in grid like images with pixels, coding certain pixels to certain metadata. We can color these pixels to classify the image with different features.  Rasters can be elevation files called DEM's (digital elevation models), they can be tiff files taken from satellite imagery which is a colored pixel shot of an area, or they can even be continuous images explaining geospatial phenomena such a rainfall or temperature.  Today we are going to demonstrate how using Arc GIS Pro, ArcPy, and GIS spatial analysis extension can automate workflows when analysis multipl...

Working with Geometries in ArcPy

Image
  Today We Are Going To Talk About Geometries! In Arc GIS, we can use Python scripting through ArcPy to read geometry data and write the data to text files, csv's, or other file types. This is extremely helpful when trying to draw geometries in applications and mapping systems.  The Python script that I created in this coding example takes a shapefile containing rivers (polylines of rivers) over an area and copies the rivers from the shapefile to a text file. This is extremely useful because we can share this text file with another GIS analyst, geocode these XY points to another map, run queries to analyze the data, and copy the data to other formats for web applications, dashboards, etc... Sounds Simple Right? I promise you its not... Let's go over the following things we need to do to make this happen: import our modules and set up our workspace create a text file called rivers text file create a search cursor to iterate through our rivers shapefile write some of the metadat...

Exploring & Manipulating Data in ArcPy

Image
 Population Data in New Mexico Shapefiles for the Data we will be using Today we are going to write a script which will copy all of the data you see above (shapefiles) and put these shapefiles into a geo database that we created.  The city point layer we will use in the new GDB is now feature classes, and we are going to iterate over them using a search cursor.  The search cursor will use delimiters to filter out certain cities that we don't want. Our goal is to select cities that are only County Seat cities. Once we iterate over (search through) these cities, we want to list out these cities in a dictionary with the city name and population.  Flowchart of the Overall Python Script in ArcPy using arc GIS Pro Let's Get Started! Creating a New GDB for our Python Script!  In order to do this we need to import all of the modules to run our script. We also need to set up our environment, and the folder paths in which we are mapping to get our data. I am referencing t...

Building Models and Geoprocessing in ArcPy

Image
A- Model Builder In Arc GIS Pro Below is a model that was built in Arc GIS Pro, specifically for soil types and farmland. The goal of the model is to remove land from basin areas that is not the best suitable land for farming. Therefore, the basins that are left are the most suitable "prime" farmland to grow crops which is shown in purple below.  Before we go any further, what is a model? what is a model in Arc Pro? This definition above is pretty straightforward according to Wikipedia... ModelBuilder  is a visual programming language for building geoprocessing workflows. Geoprocessing models automate and document your spatial analysis and data management processes. You create and modify geoprocessing models in  ModelBuilder , where a model is represented as a diagram that chains together sequences of processes and geoprocessing tools, using the output of one process as the input to another process. - Esri Example from Esri's Website   https://pro.arcgis.com/en/pro-a...