Merge Rasters Python

Least cost path analysis is a distance analysis tool within GIS that uses the least cost path (the path between two locations that costs the least to those travelling along it) to determine the most cost-effective route between a source and destination. In addition to data management benefit, geodatabase will improve performance. Sometimes you might want to merge two files, but at a particular location within the content of a file. Input Rasters (Required) The input raster datasets. It includes tools to. No more than 20 rasters can be used as input to Combine. For starters, I am working on Win 7-64bit system with 16 gb ram and i7-4770 @ 3. There is no need to specify a CLASSITEM. Spatial Analyst - Working with Rasters 1-101-207 Spatial Analyst - Course Length: Working with Rasters 16 hrs ArcGIS Version: 10. They both assign a new number to each unique combination of input values. This process can be easily automated with Python. It provides the GeoRaster class, which makes working with rasters quite transparent and easy. but I see that you combine. Learn how to combine raster and vector pictures using Python Graphics with Python 2. radosuav 2015-05-19 Fix drag & drop for PG rasters in DB Manager Alexander Bruy Juergen E. NIM080807 Prevent GP Append Parcel Fabric from creating duplicate plans. How to append multiple images to existing single page or multi-page TIFF files with CCITT4 compression. Rebuilds arrays divided by dsplit. if the highest value in the stack is contained in the first image. It is useful when you have multiple rasters that you want treated as a single item, for example, to calculate the same statistics for all, or to treat as one image when color balancing (thereby, not color balancing each image separately). We have now tested some of the basic functions from the Python GDAL/OGR API for reading and inspecting raster files. The following Map Algebra expression may help to solve the problem by interpolating values of the missing cells. How do we combine errors, in biology? The delta method Getting rasters into shape from R. You can include extra image planes (also called deep rasters) containing image representations of VEX (the mantra shading language) global variables, or exported variables/parameters from any surface or fog shader. Creating a Mosaic in Python Build a single-image composite of multiple rasters: a hands-on Jupyter Notebook tutorial using Planet data This is a static version of an interactive Jupyter Notebook: you can find this and other Notebooks in this GitHub repo. GitHub Gist: instantly share code, notes, and snippets. Math with multiple rasters - Addition 1. 3 and all of chapter 9. The Combine tool is similar to the Combinatorial Or tool. rename(src, dst) : src is source address of file to be renamed and dst is destination with the new name. map() function returns a list of the results after applying the given function to each item of a given iterable (list, tuple etc. The util_merge function is used to merge the rasters as in the example below:. [Python] Create 3D Surface / Contour (with vpython?) rasters are equally spaced points of same size along the X or Y axis with small increments and combine. For the purposes of contour creation, temporary rasters are generated using the original DTED files. If a cell location contains NoData on any of the input rasters, that location will be assigned NoData on the output. The pyQGIS cookbook contains a section on developing plugins and is an ongoing effort to collect tips and tricks about QGIS python programming generaly. The dynamic %Name% notation used in ModelBuilder will not be recognoised in Python. Mosaicing rasters Mosaicing rasters is the process of fusing multiple geospatial images with the same resolution and map projection into one raster. Merge raster in GIS Software can be tricky. 2012-01-01. Fischer 2015-02-26 remove obsolete python ts removal Merge:. Merge rasters; Plot rasters; Extract. During the mobbing, other individuals in the group (including an adult lutung male) remained nearby but did not participate. Pre-made materials included with Houdini. Maestría en Gestión de Cuencas Hidrográficas. It includes tools to. you’ll also need Python installed (again, you may already have it. I'm new to Global Mapper but have a background using ArcGIS and creating basic scripts in Python for uni assignments. The Combine tool is similar to the Combinatorial Or tool. FWTools: Open Source GIS Binary Kit for Windows and Linux Overview FWTools is a set of Open Source GIS binaries for Windows (win32) and Linux (x86 32bit) systems produced by me, Frank Warmerdam (ie. x Overview Raster datasets (images, grids, surfaces) are used in many geoscience applications. py (downloaded from github) under the osgeo site-package of Python27. The user can choose to preserve the intermediate output. Combine is similar to the Combinatorial Or tool. How can I use Python and GDAL to perform raster algebra? Is there a way that I can declare two or more satellite images lets say as A and B and thereafter use python and GDAL to perform raster. Open the ArcMap document entitled "Raster_Calculator. Trent Hare ([email protected] This section will present several examples of using NumPy array manipulation to access data and subarrays, and to split, reshape, and join the arrays. However I use the Python Imaging Library (PIL) in this example because it provides convenient methods to move data back and forth between Numpy. In a way it tries to do for rasters what GeoPandas does for geometries. I have time series NDVI rasters from MODIS data for 2014 for two tiles located in separate directory. FAQ - General. Go to Data Management Tools > Raster > Raster Processing and double click Composite Bands. Just like when dividing numbers using any other programming language (or even using a calculator, for that matter), put the number you want to be divided in front of the slash, and the number you want to divide it by after the slash. Translate virtual dataset to raster file with options for big tif mosaic files. exe cannot run at the same time •multiprocessing-Creates multiple python. #Within python, when one wants to put a string within certain quotes, they can specify this by using '%s' as a placeholder, then using. In most cases to use them you want to merge them. These collections can range in size from a few rasters to collections that are large both in terms of total file size and in the number of raster datasets participating in the mosaic. I'll try to make an italian version for my blog. The GeoRasters package is a python module that provides a fast and flexible tool to work with GIS raster files. mosaicking, clipping, and statistical reporting of slope rasters created at different baselines. Universidad Santo Tomás. Ask Question 1. If you want to visualize the results, you can use one of the Desktop GIS Software applications on OSGeoLive like QGIS. Creating a multi-band GeoTIFF from individual files using ArcGIS 9. I need to merge these rasters into one for the next step in my process. This article presents a summary of least cost path analysis, an important tool in GIS. Python Quickstart¶ Reading and writing data files is a spatial data programmer's bread and butter. ) Let's start working with rgdal by performing system setup checks. On the one hand, this is convenient, but sometimes, you need to perform this task as a intermediate step, and creating and deleting files is tedious and error-prone. In this lesson, you will use a time series mosaic to combine the rasters into one data structure and add time stamps for each of the rasters. The y rotation is the angle in radians as measured in a counter clockwise direction from the negative y axis. Rasters may represent image or numeric data. The GeoRasters package is a python module that provides a fast and flexible tool to work with GIS raster files. Raster to Vector Conversion for Overlay Analysis In some cases, it may be necessary to perform vector-based analyses on a raster data set, or vice versa. Creating Soil Maps and Rasters (Using the Soil Data Development Toolbox) 10/15/2019. Determine rasters particular area's within ranges using python so I can understand the larger thinking process in writing python. A nice source of ASCII raster file just (September 2015) made available are Digital. No more than 20 rasters can be used as input to Combine. This algorithm is derived from the GDAL buildvrt utility. 3 and all of chapter 9. Python Window - a convenient place to use geoprocessing tools and python script. The raw pixel value itself (“[pixel]”) and, for paletted images, the red, green and blue color associated with that pixel value (“[red]”, “[green]” and “[blue]”) are available for use in classifications. 1 because is one part of a whole process. NOTE: for some reason, the flow direction generated with the r. Arcpy script to check for TIFF files and add them to different lists. They are extracted from open source Python projects. Double-click one of the rasters in the Layers list and add a comma after the raster's name in the expression box. …For a very high-resolution. It includes tools to. Raster calculator Creating NDVI mosaic for parts of Colby using NAIP data. NOTE: for some reason, the flow direction generated with the r. You have to define the workspace of interest prior to running the ListRasters function (check its syntax here). In the last step you. Overview of the task ¶. For a large raster this is pretty heavy and this was the cause of all those problems. You can merge them in ArcGIS in two ways: mosaic to new raster; Combining these tools: create raster catalog; raster catalog to new raster. This is called a merge operation. To complete Lesson 3, you are required to do the following: Work through the course lesson materials. In this hands-on workshop we will explore the tools in GRASS GIS for processing point clouds obtained by lidar or through processing of UAV imagery. Data manipulation in Python is nearly synonymous with NumPy array manipulation: even newer tools like Pandas are built around the NumPy array. The GeoRasters package is a python module that provides a fast and flexible tool to work with GIS raster files. rename(src, dst) : src is source address of file to be renamed and dst is destination with the new name. These collections can range in size from a few rasters to collections that are large both in terms of total file size and in the number of raster datasets participating in the mosaic. merge Combine Raster* objects with different extents (but same origin and resolution) mosaic Combine RasterLayers with different extents and a function for overlap areas crop Select a geographic subset of a Raster* object extend Enlarge a Raster* object trim Trim a Raster* object by removing exterior rows and/or columns that only have NAs. speed and direction) 4. It provides the GeoRaster class, which makes working with rasters quite transparent and easy. #Within python, when one wants to put a string within certain quotes, they can specify this by using '%s' as a placeholder, then using. It turns out the gdal_polygonize utility just wraps a call to GDALFPolygonize so writing your own hacky polygonize Python script is pretty easy. I would like to combine some 1-band raster images. I have a list of many many rasters. vector data vary significantly due to differences in structure. Merge rasters; Plot rasters. Each of the raster layers in the view represents one of our criteria. GDAL allows this by defining in-memory raster files. In this recipe, we'll combine two overlapping satellite images into a single dataset. If the file sizes are small and manageable, then vi is a great editor tool to do this. functions module¶. Note! In this case Python in c:\Python27 is used including the gdal_merge. Merging rasters using GDAL¶ This is called mosaic to new raster in ArcMap. The inputs of the Merge tool must be the same data type (eg points, lines, polygons). You can vote up the examples you like or vote down the exmaples you don't like. You can include extra image planes (also called deep rasters) containing image representations of VEX (the mantra shading language) global variables, or exported variables/parameters from any surface or fog shader. Select Model ->Export-> To Python Script Navigate to the folder where the input rasters are located and save the new script. List Available Soil Maps 6. You have to define the workspace of interest prior to running the ListRasters function (check its syntax here). I can simply add this to the command line with ‘-utm 19N’. r1 has larger extent; r2 is smaller and its extents fall totally within r1. Python modules to import. Rotation is used to represent rasters that are not aligned with the x and y axes. I'm new to Global Mapper but have a background using ArcGIS and creating basic scripts in Python for uni assignments. They are extracted from open source Python projects. On the one hand, this is convenient, but sometimes, you need to perform this task as a intermediate step, and creating and deleting files is tedious and error-prone. They are extracted from open source Python projects. In QGIS contrast enhancement for rasters is turned on by default, so each time a raster is opened QGIS had to calculate the stats (max and min for example) for the raster and then scale the contrast. Here are the rasters: > r1 class. import georasters as. check_output(command) output. Merge raster in GIS Software can be tricky. ; Charnely, S. merge module¶ Copy valid pixels from input files to an output file. If you want something that's a little more … - Selection from Python Geospatial Analysis Cookbook [Book]. ESRI rasters in GRASS or QGIS On March 15, 2010 November 3, 2015 By pvanb In Data handling , GIS , GIS software , GRASS GIS To exchange data one should preferably use a non-proprietary format, such as the ARC/INFO ASCII GRID or GeoTIFF. Data manipulation in Python is nearly synonymous with NumPy array manipulation: even newer tools like Pandas are built around the NumPy array. Welcome to the Python GDAL/OGR Cookbook!¶ This cookbook has simple code snippets on how to use the Python GDAL/OGR API. 4 support has been added for classifying non-8bit raster inputs. Rasters can be classified in a manner similar to vectors, with a few exceptions. Mostly this works transparently but there are a few caveats and options to provide explicit control. NIM080807 Prevent GP Append Parcel Fabric from creating duplicate plans. Python Ok to add to my disdain over the way the spatial analyst toolbar was stripped down I know cannot figure out how to do a simple merge (rasters) with spatial analyst and the Raster Calculator command (in the Map Algebra Toolbox). Merge raster in GIS Software can be tricky. py , that does that, but many times is useful to code them. I can merge several mbtiles into a single one IF the input mbtiles have ONLY ONE zoom level (so no selection is made). Merge rasters. On the right, I have a bunch of functions I can use. Using Arcpy with multiprocessing - Part 3 Posted on July 31, 2013 December 16, 2017 by StacyR in Arcpy , Parallelisation , Python The following post builds upon the script and methods developed in Part 1 and Part 2 , so read them first!. In this series, we’ll learn about a powerful, widely-used, and broadly applicable Free & Open Source Software (FOSS) tool in python that will empower you to do more with your data. Clipping rasters can be trivial with a desktop GIS like QGIS or with command line tools like GDAL. This is a raster file (converted from a polygon) that approximates the boundary of the “good” elevation data. The GeoRasters package is a python module that provides a fast and flexible tool to work with GIS raster files. If you want something that's a little more visually appealing, we will perform a combination of a slope, hillshade, and some color relief. 1 Get a list of feature classes, tables, rasters. ) Let's start working with rgdal by performing system setup checks. 3 minute resolution global rasters for the JPEG format. Double-click one of the rasters in the Layers list and add a comma after the raster's name in the expression box. Rasters may represent image or numeric data. These bindings extend Python, but provide little abstraction for GDAL’s C API. map() function returns a list of the results after applying the given function to each item of a given iterable (list, tuple etc. Using Python to execute merge of rasters. For example, if five raster images (--inputs) are input to the tool, the output raster (--output) would show which of the five input rasters contained the highest value for each grid cell. If a cell location contains NoData on any of the input rasters, that location will be assigned NoData on the output. Also, as mentioned by @abarnet, the for i in range(30): line is useless if you want to loop over all rasters in your workspace. GDAL/OGR Quickstart ¶ You will need nothing but a terminal for this quickstart. It turns out the gdal_polygonize utility just wraps a call to GDALFPolygonize so writing your own hacky polygonize Python script is pretty easy. Note that if. ESRI rasters in GRASS or QGIS On March 15, 2010 November 3, 2015 By pvanb In Data handling , GIS , GIS software , GRASS GIS To exchange data one should preferably use a non-proprietary format, such as the ARC/INFO ASCII GRID or GeoTIFF. I found a similar question but the accepted answer adivices against using R for this purpose. Attributes from both the layer are copied. Maestría en Gestión de Cuencas Hidrográficas. It includes tools to. I want to have a simple and easy to understand script that takes this and merges it into one big mosaic. Combining raster datasets for analysis. A nice source of ASCII raster file just (September 2015) made available are Digital. GitHub Gist: instantly share code, notes, and snippets. py (downloaded from github) under the osgeo site-package of Python27. Merge the rasters together. Rebuilds arrays divided by dsplit. Merge the tiles. Find ArcGIS Rasters and Interpolate No Data Cells. Select the folder where the two (or more) shapefiles you want to merge are located using the Browse button. command = "python. I can simply add this to the command line with '-utm 19N'. Math with multiple rasters - Addition 1. Combine multiple rasters into one image; About : QGIS Python Programming will teach you how to write Python code that works with spatial data to automate geoprocessing tasks in QGIS. 4 support has been added for classifying non-8bit raster inputs. You merge rasters in GDAL using gdal_merge. Question: I have multiple shapefiles of underwater forms (coral reef, outcrop, sandflat, etc) that I would like to combine into a single shapefile. Go find them on your computer, read the source code and mine them for API tricks. When you enter a duplicate key, the information found in the second entry wins — the first. On the right, I have a bunch of functions I can use. QGIS has a lot of documentation. The 2018 Institute focuses on remote sensing of vegetation using open source tools and reproducible science workflows -- the primary programming language will be Python. Python Ok to add to my disdain over the way the spatial analyst toolbar was stripped down I know cannot figure out how to do a simple merge (rasters) with spatial analyst and the Raster Calculator command (in the Map Algebra Toolbox). However, GDAL also includes other powerful functions for data translation and processing which are not directly implemented in the library. I tried looking at gdalwarp and gdal_merge (in command-line), but in the overlap they just use the values from the last image. In this exercise, we will use the raster Calculator to help us find ideal areas in which to build a new home. This package implements a library and associated command-line tool called mergetiff that provides functionality to merge raster bands from multiple GeoTiff files into a single dataset. Create "IF" statement to set up a "for, in" loop. They are extracted from open source Python projects. It includes tools to. Raster Extent Modification Using QGIS UPDATE : you can download script for Processing module to perform this task from here. If a cell location contains NoData on any of the input rasters, that location will be assigned NoData on the output. …In the United States, a common system…is to split the raster data up according to…USGS topographic map quadrants…that cover the entire country. Usage looks something like this:. It provides the GeoRaster class, which makes working with rasters quite transparent and easy. They both assign a new number to each unique combination of input values. In this lesson, you will use Python to aggregate (i. Repeat until all rasters have been added. Select the folder where the two (or more) shapefiles you want to merge are located using the Browse button. It is composed of a stable internal API, and an embedded Jython interpreter. All input datasets must be of the same type (that is, several point feature classes can be merged, or several tables can be merged, but a line feature class cannot be merged with a polygon feature class). That is input rasters with values outside the range 0-255. I'll take a look at that now. I can simply add this to the command line with '-utm 19N'. check_output(command) output. Note! In this case Python in c:\Python27 is used including the gdal_merge. They are extracted from open source Python projects. Translate virtual dataset to raster file with options for big tif mosaic files. Default menu: Raster ‣ Miscellaneous. They both assign a new number to each unique combination of input values. I am trying to "mosaic to new raster" some large rasters and I'm wondering what I can do to speed things up. Data manipulation in Python is nearly synonymous with NumPy array manipulation: even newer tools like Pandas are built around the NumPy array. It provides the GeoRaster class, which makes working with rasters quite transparent and easy. Merge Two Files at Arbitrary Location. The Spatial Join tool was used to combine the burglary data into the grid table. Rebuilds arrays divided by dsplit. In Python3, rename() method is used to rename a file or directory. Python map() function. Project all of the rasters. 1 9/21/2012 12:04:00 PM Page 3 6. In this recipe, we'll combine two overlapping satellite … - Selection from QGIS Python Programming Cookbook [Book]. It is composed of a stable internal API, and an embedded Jython interpreter. The inputs must have the same number of bands and same bit depth. Master over 170 recipes that will help you turn QGIS from a desktop GIS tool into a powerful automated geospatial frameworkAbout This BookDelve into the undocumented features of the QGIS APIGet a set of user-friendly recipes that can automate entire geospatial workflows by connecting Python GIS building blocks into comprehensive processesThis book has a complete code upgrade to QGIS 2. NIM080786 Using Python in the Field Calculator gives incorrect results with non-acai characters starting at ArcGIS 10 SP4. Python Modules •threading-Don't use unless you have a very specific reason to do so-core developers-Global Interpreter Lock-Two threads controlled by a single python. 5 Python Functionalities Every ArcGIS Specialist Should Learn Published on December 20, 2016 December 20, 2016 • 23 Likes • 0 Comments. Fischer 2015-02-26 remove obsolete python ts removal Merge:. Each unique combination of values from the two input rasters receives a unique value in the output raster. Mosaicing rasters Mosaicing rasters is the process of fusing multiple geospatial images with the same resolution and map projection into one raster. If you want something that's a little more visually appealing, we will perform a combination of a slope, hillshade, and some color relief. Get involved and help us write a better documentation. This would display the results using the colors specified for each layer and we could compare them on the Profile tab. Sounds neat? Let's take a look at both techniques to clip rasters in ArcMap. Check if rasters have the same Spatial reference. it is also recommended to use Merge Raster in this case. I would like to combine some 1-band raster images. The dynamic %Name% notation used in ModelBuilder will not be recognoised in Python. Merging rasters to generate a color relief map Generating a color relief raster is a one-liner with the gdaldem color-relief command line. They both assign a new number to each unique combination of input values. Overview of the task ¶ We will download elevation data for Sri Lanka in form of SRTM tiles, merge them and clip the resulting mosaic to the country boundary. Python gdal. Also, as mentioned by @abarnet, the for i in range(30): line is useless if you want to loop over all rasters in your workspace. Here, we will create a mosaic based on 2X2m resolution DEM files (altogether 12 files) covering the Helsinki Metropolitan region. Use raster data to infill missing data in a well attribute table by overlaying the well spots with the raster (Environment Settings, Processing Order, Clip, Rasters with Functions, Merge, Nibble, Region Group, Cell Statistics, Extract Values to Points). …For a very high-resolution. It provides the GeoRaster class, which makes working with rasters quite transparent and easy. (After you select Display Selected Rasters, the button name changes to Display All Rasters. In a way it tries to do for rasters what GeoPandas does for geometries. This document explains how to use Rasterio to read existing files and to create new files. On the one hand, this is convenient, but sometimes, you need to perform this task as a intermediate step, and creating and deleting files is tedious and error-prone. In ArcMap it is VERY slow. Open the ArcMap document entitled "Raster_Calculator. There are 3 different raster data elements: raster dataset, raster band, and raster catalog. If the file sizes are small and manageable, then vi is a great editor tool to do this. Multiple NLM rasters can be merged or merged together to create new landscape patterns. I have time series NDVI rasters from MODIS data for 2014 for two tiles located in separate directory. It will cover topics such as querying and editing vector data and using raster data. In a way it tries to do for rasters what GeoPandas does for geometries. Learn how to symbolize vector and raster layers in QGIS using programming from this section of the preview chapter, Creating Dynamic Maps from QGIS Python Programming CookBook. GDAL is a powerful and mature library for reading, writing and warping raster datasets, written in C++ with bindings to other languages. During the mobbing, other individuals in the group (including an adult lutung male) remained nearby but did not participate. With a mosaic you can merge several raster files. If you open the properties for this item (by clicking the arrow in the Raster field) you can view the Merge Rasters function in the function chain. The output raster is always of integer type. The raw pixel value itself (“[pixel]”) and, for paletted images, the red, green and blue color associated with that pixel value (“[red]”, “[green]” and “[blue]”) are available for use in classifications. The ArcGIS Composite Bands tool combines spectral bands from single band rasters. Then you could use Combine with the original rasters to add the. In this recipe, we'll combine two overlapping satellite images into a single dataset. This assignment expects at least basic knowledge of Python, GRASS GIS and how they are used together. NIM080786 Using Python in the Field Calculator gives incorrect results with non-acai characters starting at ArcGIS 10 SP4. dstack¶ numpy. This Quick Start is divided into two parts: GDAL (raster data) and OGR (vector data). In the image below, two rasters were input into the Combine function (and aside from using the Combine tool, the syntax to execute the operation in both Map Algebra and the GP Command Line is included). dstack (tup) [source] ¶ Stack arrays in sequence depth wise (along third axis). Python integrated development environment (IDE) - a learning environment that aids in the assistance of learning python. I'd like to combine about a dozen rasters into one raster that contains the "summed" cell values where overlaps occur. If you want something that's a little more … - Selection from Python Geospatial Analysis Cookbook [Book]. The “LAStools Pipelines” shown below were created in ArcGIS 9. 3 thoughts on " GDAL raster data tips and tricks " andrea August 6, 2008 at 12:26 pm. exe cannot run at the same time •multiprocessing-Creates multiple python. red, green, blue, or infra-red. Type merge in the expression box. (Note: This is also doable in Bash scripting, as learned in the previous lesson, and you can even combine the two. The Merge Rasters function represents a grouped or merged collection of rasters. Use this tool to combine datasets from multiple sources into a new, single output dataset. With a mosaic you can merge several raster files. Topics include preparing data as strings, lists, tuples, and dictionaries prior to use, using Python to run SQL queries, working with rasters in Python, automating mapping tasks, and developing custom scripting tools. Then 'lasoverlap' will produce in addition to the PNG output also a KML file that allows visualizing the overlap and difference rasters within the geo-spatial context of Google Earth. This is a simple way to stack 2D arrays (images) into a single 3D array for processing. For this exercise, we're going to start with a 30-meter resolution digital elevation model (DEM) for Philadelphia. FAQ - General. Se presenta una técnica para combinar modelos digitales de terreno DEM utilizando QGIS. When the rasters are merged, they are combined into a single layer that can be used for contour generation without affecting your original DTEDs. When the inputs are features, all input features must be of the same feature type as the features of the target dataset. Using Python to execute merge of rasters. it is also recommended to use Merge Raster in this case. get_datastores (gis=None) ¶ Returns a helper object to manage raster analytics datastores in the GIS. Data manipulation in Python is nearly synonymous with NumPy array manipulation: even newer tools like Pandas are built around the NumPy array. Now say given n images in a folder having random names. …In the United States, a common system…is to split the raster data up according to…USGS topographic map quadrants…that cover the entire country. Note! In this case Python in c:\Python27 is used including the gdal_merge. The dynamic %Name% notation used in ModelBuilder will not be recognoised in Python. Tools include New Project Geodatabase, Merge Files, Topology Check, Build Polygons, and Slope/Aspect Test. While the new Mosaic Datasets are great, what if you only have 9. py -o TEAK_Aspect_Mosaic. More information on the options of gdal_merge. Merge rasters; Plot rasters. I'm using Python. The output raster is always of integer type. Using Python code from ArcCatalog can speed up batch processing for many ESRI tools; provide an amount of flexibility on output dataset names; and maintain a record of what we’ve done in the geoprocessing history. To merge several and large ESRI-shapefiles # Monthly rasters at 100m pixel. The fact-checkers, whose work is more and more important for those who prefer facts over lies, police the line between fact and falsehood on a day-to-day basis, and do a great job. Today, my small contribution is to pass along a very good overview that reflects on one of Trump’s favorite overarching falsehoods. Namely: Trump describes an America in which everything was going down the tubes under  Obama, which is why we needed Trump to make America great again. And he claims that this project has come to fruition, with America setting records for prosperity under his leadership and guidance. “Obama bad; Trump good” is pretty much his analysis in all areas and measurement of U.S. activity, especially economically. Even if this were true, it would reflect poorly on Trump’s character, but it has the added problem of being false, a big lie made up of many small ones. Personally, I don’t assume that all economic measurements directly reflect the leadership of whoever occupies the Oval Office, nor am I smart enough to figure out what causes what in the economy. But the idea that presidents get the credit or the blame for the economy during their tenure is a political fact of life. Trump, in his adorable, immodest mendacity, not only claims credit for everything good that happens in the economy, but tells people, literally and specifically, that they have to vote for him even if they hate him, because without his guidance, their 401(k) accounts “will go down the tubes.” That would be offensive even if it were true, but it is utterly false. The stock market has been on a 10-year run of steady gains that began in 2009, the year Barack Obama was inaugurated. But why would anyone care about that? It’s only an unarguable, stubborn fact. Still, speaking of facts, there are so many measurements and indicators of how the economy is doing, that those not committed to an honest investigation can find evidence for whatever they want to believe. Trump and his most committed followers want to believe that everything was terrible under Barack Obama and great under Trump. That’s baloney. Anyone who believes that believes something false. And a series of charts and graphs published Monday in the Washington Post and explained by Economics Correspondent Heather Long provides the data that tells the tale. The details are complicated. Click through to the link above and you’ll learn much. But the overview is pretty simply this: The U.S. economy had a major meltdown in the last year of the George W. Bush presidency. Again, I’m not smart enough to know how much of this was Bush’s “fault.” But he had been in office for six years when the trouble started. So, if it’s ever reasonable to hold a president accountable for the performance of the economy, the timeline is bad for Bush. GDP growth went negative. Job growth fell sharply and then went negative. Median household income shrank. The Dow Jones Industrial Average dropped by more than 5,000 points! U.S. manufacturing output plunged, as did average home values, as did average hourly wages, as did measures of consumer confidence and most other indicators of economic health. (Backup for that is contained in the Post piece I linked to above.) Barack Obama inherited that mess of falling numbers, which continued during his first year in office, 2009, as he put in place policies designed to turn it around. By 2010, Obama’s second year, pretty much all of the negative numbers had turned positive. By the time Obama was up for reelection in 2012, all of them were headed in the right direction, which is certainly among the reasons voters gave him a second term by a solid (not landslide) margin. Basically, all of those good numbers continued throughout the second Obama term. The U.S. GDP, probably the single best measure of how the economy is doing, grew by 2.9 percent in 2015, which was Obama’s seventh year in office and was the best GDP growth number since before the crash of the late Bush years. GDP growth slowed to 1.6 percent in 2016, which may have been among the indicators that supported Trump’s campaign-year argument that everything was going to hell and only he could fix it. During the first year of Trump, GDP growth grew to 2.4 percent, which is decent but not great and anyway, a reasonable person would acknowledge that — to the degree that economic performance is to the credit or blame of the president — the performance in the first year of a new president is a mixture of the old and new policies. In Trump’s second year, 2018, the GDP grew 2.9 percent, equaling Obama’s best year, and so far in 2019, the growth rate has fallen to 2.1 percent, a mediocre number and a decline for which Trump presumably accepts no responsibility and blames either Nancy Pelosi, Ilhan Omar or, if he can swing it, Barack Obama. I suppose it’s natural for a president to want to take credit for everything good that happens on his (or someday her) watch, but not the blame for anything bad. Trump is more blatant about this than most. If we judge by his bad but remarkably steady approval ratings (today, according to the average maintained by 538.com, it’s 41.9 approval/ 53.7 disapproval) the pretty-good economy is not winning him new supporters, nor is his constant exaggeration of his accomplishments costing him many old ones). I already offered it above, but the full Washington Post workup of these numbers, and commentary/explanation by economics correspondent Heather Long, are here. On a related matter, if you care about what used to be called fiscal conservatism, which is the belief that federal debt and deficit matter, here’s a New York Times analysis, based on Congressional Budget Office data, suggesting that the annual budget deficit (that’s the amount the government borrows every year reflecting that amount by which federal spending exceeds revenues) which fell steadily during the Obama years, from a peak of $1.4 trillion at the beginning of the Obama administration, to $585 billion in 2016 (Obama’s last year in office), will be back up to $960 billion this fiscal year, and back over $1 trillion in 2020. (Here’s the New York Times piece detailing those numbers.) Trump is currently floating various tax cuts for the rich and the poor that will presumably worsen those projections, if passed. As the Times piece reported: