More

Create a fishnet in a 'for' loop with Arcpy

Create a fishnet in a 'for' loop with Arcpy


When running the following script, I get the error saying that I need a value for “origin_coord” and for “y_axis_coord”. So is it not enough to define a template dataset? But how can I fill the “origin_coord” and “y_axis_coord” parameters with Arcpy working with ArcMap 10.0? Because in the loop are a lot of shapefiles from different cities, so I need a loop.

import arcpy import os from arcpy import env env.overwriteOutput = True env.workspace = r"D:Usersjuliaout_09_09urbanA" env.qualifiedFieldNames = False #make a list with input cities as shapefiles. fcList = arcpy.ListFeatureClasses() for shpFile in fcList: shpFileName= os.path.splitext (shpFile) [0] print shpFileName # works # Process: Make Feature Layer arcpy.MakeFeatureLayer_management(env.workspace + "" + shpFile, "shpFile_ly") # join the city with the reclasstable jointable = r"D:Usersjuliaout_09_09
eclass.dbf" arcpy.AddJoin_management("shpFile_ly", "CODE", jointable, "joinCODE", "KEEP_ALL") # Process: Copy Features outFeatureClass = shpFileName + "_join.shp" arcpy.CopyFeatures_management("shpFile_ly", outFeatureClass) # Process: Polygon to Raster outraster = shpFileName + "_join.img" cellSize = 200 arcpy.PolygonToRaster_conversion(outFeatureClass, "CODE", outraster, "CELL_CENTER", "NONE", cellSize) # Process: Make Raster Layer arcpy.MakeRasterLayer_management(outraster, "outraster_ly")#works # Process: Add Join arcpy.AddJoin_management("outraster_ly", "Value", jointable, "code", "KEEP_ALL") # Process: Copy Raster outraster2 = shpFileName + "_join2.img" arcpy.CopyRaster_management("outraster_ly",outraster2) #works # Process: Raster to Polygon outPolygons = shpFileName + "reclass.shp" arcpy.RasterToPolygon_conversion(outraster2, outPolygons, "NO_SIMPLIFY", "Value")#works # Process: Create Fishnet cellSizeWidth = "200" cellSizeHeight = "200" outFishnet = shpFileName + "_net.shp" arcpy.CreateFishnet_management(outFishnet, "", "", cellSizeWidth, cellSizeHeight, "0", "0", "", "NO_LABELS", outPolygons, "POLYGON")

Is there someone who can help me? I'm trying it without the Iteration but it is not working even if I add a layer before? Why?

import arcpy from arcpy import env env.overwriteOutput = True env.workspace = r"D:Usersjuliaerste_aufg" # Process: Make Feature Layer #arcpy.MakeFeatureLayer_management(r"D:Usersjuliaerste_aufgde013l_hannover de013l_hannoverde013l_hannover.shp", "hannover_ly") #Process: Create Fishnet outFeatureClass = r"D:Usersjuers
esulthannover_fisch.shp" cellSizeWidth = '200' cellSizeHeight = '200' templateExtent = r"D:Usersjuersde013l_hannoverde013l_hannoverde013l_hannover.shp" arcpy.CreateFishnet_management(outFeatureClass, "", "", cellSizeWidth, cellSizeHeight, '0', '0', "", "NO_LABELS", templateExtent, "POLYGON")

From the help for Create Fishnet (Data Management) the usage is:

CreateFishnet_management (out_feature_class, origin_coord, y_axis_coord, cell_width, cell_height, number_rows, number_columns, {corner_coord}, {labels}, {template}, {geometry_type})

Compare this with what you are supplying and there are a number of errors.

As one example, the values expected forcell_widthandcell_heightare expected to be of type Double (e.g. 200 and 200) but you are providing them with strings (i.e. "200" and "200").

I recommend that you run the tool from its dialog once and then use Copy As Python Snippet from the Geoprocessing | Results window to copy the syntax into your script so that you can just substitute in your variables and values.

I would put the rest of your script aside until you can get this part working in a few line test script.


Iterate through folders and extract shapefiles to a geodatabase in python

Hi I am using sample data. In a folder called Shapefile, I have 3 folders each one has 3 shapefiles named Hazard1.shp, Hazard2.shp, Hazard3.shp (there are about 3000 records in each). I am trying to iterate through each of these folders and extract Hazard1.shp from each folder and merge it into a feature class in a geodatabase called totals. This code is meant for hundreds of folders but I am using a sampling of 3. I run my code, with no errors but when I check totals there are only 3000 records - from the merge there should be 12,000. What am I doing wrong?


Python Script for Broken MXD Links.

Hoping you guys can help me with this. We recently had a departmental name change and in doing so our IT department has renamed our global folder. The folder that used to be "Asset_Manage" is now "GIS". Here's the kicker, that folder is/was the root folder for all of our GIS data and . MXD's. Once the change took place all of our MXD's have broken links (Layers i.e. red exclamation points).

I came up with a simple python ".replace" script but it only fixes one .MXD at a time and I have to create a new .MXD for it to write to, I can't "overwrite" the .MXD i'm trying to fix (see code below). What Iɽ like to do is create a tool, in Python, that can be pointed to a folder full of MXD's and have it loop through all the MXD's and run the replace tool without having to create a new MXD. I hope this makes sense, if you guys can help it would save a boat-load of time.

Python Script I'm using for the tool. (Again, i'm only able to do one MXD at a time and I have to first create a new MXD, which equals "Holder" in the code, to write too, otherwise it works fine.)

EDIT: A buddy advised me to post over in r/GISscripts as well. Obviously I'm a beginner at Python, any help would be appreciated.


Code sample

CreateRandomPoints example 1 (Python window)

The following Python window script demonstrates how to use the CreateRandomPoints tool in immediate mode.

CreateRandomPoints with Random Values example 2 (stand-alone Python script)

The following stand-alone Python script demonstrates how to create random points with random values.

CreateRandomPoints example 3 (stand-alone Python script)

The following stand-alone Python script demonstrates several methods to use the CreateRandomPoints tool.


Map book types

There are a number of map book configurations, or types, that you can create.

A reference series map book

A reference series map book is a set of map pages in which the layout of each page is identical except for the extent of the detail page and the content of some page elements. A reference series map book lacks a title page, overview map, ancillary pages, and other unique page layouts. It can be quickly defined in ArcMap using Data Driven Pages and exported via the export map dialog box without the need to configure a special arcpy.mapping export script.

The example above shows a topographic map book for Arenac County, Michigan. This 22-page series can be easily created by any ArcMap user with an Internet connection. The data comes from the USA Topographic map service available at ArcGIS Online . No other data is needed to re-create this map series. You can easily re-create this reference series using Data Driven Pages, the geoprocessing tools available from the Data Driven Pages toolset, data frame properties, and dynamic text.

Map book with title and map index (overview) page

A more complete map book includes a title page and an index (or overview) map page. You can accomplish this by using a combination of ArcMap Data Driven Pages and an - arcpy.mapping Python script. Use the Data Driven Pages for a single map document (single layout) to create the map pages for the book, while another map document can be used to create the index map page. You could use yet another map document to author the title page, or you can use other software to create a PDF document for the title page. Use arcpy.mapping to combine all these elements into a single map book.

The example above shows a topographic map book for Arenac County, Michigan. This map includes a title page and an overview map page. You can create this document using Data Driven Pages and an arcpy.mapping Python script.

For detailed instructions on how to do this, see Adding title and overview map pages to your map book.

Map books with ancillary documents

Many map books include ancillary, or supporting, documents. These can be report text, tables, indexes, and other supporting data. Creating these types of map books can be done through a combination of ArcMap Data Driven Pages and an arcpy.mapping Python script.

The example above shows a topographic map book for Arenac County, Michigan. This map book includes a number of supporting pages offering text information, graphs, and tabular data. You can create this document using Data Driven Pages and an arcpy.mapping Python script.

For detailed instructions on how to do this, see Inserting supporting pages into your map book.

Map books with facing pages

Facing pages allow the map author to account for the book gutter. The gutter is the space required to allow for binding book pages together. Often, this is a map book that contains a reference series covering a succession of map extents, just as a reference map book does. However, unlike a reference series, this map book utilizes the layouts of two map documents: one for the left page and one for the right. The series extents are defined using Data Driven Pages. Create the same set of Data Driven Pages in each map document. The arcpy.mapping Python script uses both map documents and assembles the left and right pages into the final PDF document in the proper order.

The example above shows a topographic map book for Arenac County, Michigan, with facing pages. Notice that the odd-numbered map pages (for example, page 3) have a layout alignment such that all page elements are shifted to the left. Even-numbered map pages (for example, page 4) are aligned to the right. This is to allow space for the book binding. Also, page numbers and the locator map have been located for each map layout so that they are on the outside of the page. Each page alignment (both left and right) is based on a separate ArcMap document. You can create this document using Data Driven Pages and an arcpy.mapping Python script.

For detailed instructions on how to do this, see Creating a map book with facing pages.

Strip map

A strip map is a set of map pages that follow a route, such as a river, road, or pipeline. Each page of the map shows a defined geographic area on either side of the line feature. Each subsequent page in a strip map shows the area further down the line. Often, there is a bit of geographic overlap between adjacent map pages. The direction of north on the page shifts so that the flow of map is kept constant. A strip map can be quickly defined in ArcMap using Data Driven Pages and exported via the export map dialog box.

The example above shows a strip map for the Rhine River between the cities of Köln and Koblenz. This 44-page series can be easily created by any ArcMap user with an Internet connection. The data comes from the World Topographic map service available at ArcGIS Online. You can easily re-create this strip map using Data Driven Pages, the geoprocessing tools available from the Data Driven Pages toolset, data frame properties, and dynamic text. You will need to create the line feature used to determine the route of the strip map. This can be done by creating a new line feature class using the ArcMap editing tools.

Thematic map book

A thematic map book is similar to a reference series, except that the detail pages show unique thematic maps of a single location. It is also possible to build a hybrid thematic-reference series that includes a series of thematic maps for multiple map extents. As in the case of a reference map book, exporting a thematic map book requires a Python script that defines the maps to be included and executes the document assembly steps.

Reference map book with insets

An inset map is a supplementary map, displayed using an additional data frame, that depicts an enlarged specific geographic subarea at a larger scale in order to show more information than possible in the main map. For example, many atlases use inset maps to show more detail for densely populated areas. Creating map books with inset maps on certain pages can be done by integrating Data Driven Pages and arcgis scripting. The following image is an example of one such map book. Notice that only two of the pages contain inset maps, and that they are different sizes and in different locations on the page.

One way this can be done is by using a set of map documents. For pages that don't contain inset maps, a shared map document containing Data Driven Pages can be used. Another map document can be used for pages that contain an inset map. If the inset map location is different on different pages, use a separate map document to define each inset location. Then all the map documents can be synchronized using the index layer.

Create a field on the index layer that selects the map document to use for the given map extent. It could be as easy as 1, 2, or 3, where 1 means use the basic map document with no insets, 2 means use the map document with an inset in position a, and 3 means use the map document with an inset in position b. An additional field could specify the map extent of the inset.

The script can then get the page list from the first map document and loop through using the map document field to determine which map document should be used to create output for the current page. For inset pages, the additional inset extent field is read and applied before outputting.

You can also create a map book with inset maps on certain pages only by using a single map document and an export script containing custom logic to control not only the visibility of the inset map, but also its size, scale, and location on the page. For detailed instructions outlining this particular workflow, see Creating a map book with inset maps.


Contents

In the past, GIS was not a practical source of analysis due to the difficulty in obtaining spatial data on habitats or organisms in underwater environments. With the advancement of radio telemetry, hydroacoustic telemetry and side-scan sonar biologists have been able to track fish species and create databases that can be incorporated into a GIS program to create a geographical representation. Using radio and hydroacoustic telemetry, biologists are able to locate fish and acquire relatable data for those sites, this data may include substrate samples, temperature, and conductivity. Side-scan sonar allows biologists to map out a river bottom to gain a representation of possible habitats that are used. These two sets of data can be overlaid to delineate the distribution of fish and their habitats for fish. This method has been used in the study of the pallid sturgeon.

Over a period of time large amounts of data are collected and can be used to track patterns of migration, spawning locations and preferred habitat. Before, this data would be mapped and overlaid manually. Now this data can be entered into a GIS program and be layered, organized and analyzed in a way that was not possible to do in the past. Layering within a GIS program allows for the scientist to look at multiple species at once to find possible watersheds that are shared by these species, or to specifically choose one species for further examination. The US Geological Survey (USGS) in, cooperation with other agencies, were able to use GIS in helping map out habitat areas and movement patterns of pallid sturgeon. At the Columbia Environmental Research Center their effort relies on a customized ArcPad and ArcGIS, both ESRI (Environmental Systems Research Institute) applications, to record sturgeon movements to streamline data collection. A relational database was developed to manage tabular data for each individual sturgeon, including initial capture and reproductive physiology. Movement maps can be created for individual sturgeon. These maps help track the movements of each sturgeon through space and time. This allowed these researchers to prioritize and schedule field personnel efforts to track, map, and recapture sturgeon.

Macrophytes are an important part of healthy ecosystems. They provide habitat, refuge, and food for fish, wildlife, and other organisms. Though natural occurring species are of great interest so are the invasive species that occur alongside these in our environment. GIS is being used by agencies and their respective resource managers as a tool to model these important macrophyte species. Through the use of GIS resource managers can assess the distributions of this important aspect of aquatic environments through a spatial and temporal scale. The ability to track vegetation change through time and space to make predictions about vegetation change are some of the many possibilities of GIS. Accurate maps of the aquatic plant distribution within an aquatic ecosystem are an essential part resource management.

It is possible to predict the possible occurrences of aquatic vegetation. For example, the USGS has created a model for the American wild celery (Vallisneria americana) by developing a statistical model that calculates the probability of submersed aquatic vegetation. They established a web link to an Environmental Systems Research Institute (ESRI) ArcGIS Server website *Submersed Aquatic Vegetation Model to make their model predictions available online. These predictions for distribution of submerged aquatic vegetation can potentially have an effect on foraging birds by creating avoidance zones by humans. If it is known where these areas are, birds can be left alone to feed undisturbed. When there are years where the aquatic vegetation is predicted to be limited in these important wildlife habitats, managers can be alerted.

Invasive species have become a great conservation concern for resource managers. GIS allows managers to map out plant locations and abundances. These maps can then be used to determine the threat of these invasive plants and help the managers decide on management strategies. Surveys of these species can be conducted and then downloaded into a GIS system. Coupled with this, native species can be included to determine how these communities respond with each other. By using known data of preexisting invasive species GIS models could predict future outbreaks by comparing biological factors. The Connecticut Agricultural Experiment Station Invasive Aquatic Species Program (CAES IAPP) is using GIS to evaluate risk factors. GIS allows managers to georeference plant locations and abundance. This allows for managers to display invasive communities alongside native species for study and management.


7. DRY — Don't Repeat Yourself (using dict to reduce duplication)

While the formula_scoreX variables above are much improved, and the explicit loops eliminated, there's still a lot of repetition. Sure, just 2-4 copies of those list comprehensions isn't really so bad however, it doesn't scale well if your business logic needs to expand to, say, 20 or 50 score groupings.

Let's use dict to map the score type (1, 2, 3, or 4) to the appropriate strings. We need 2 dictionaries (one for the "_Score" strings, one for the 2 "coalesce" strings):

There's a lot to unpack in those 2 statements, but they look worse than they are. Here's a simple dictionary creation (with list comprehension to help create it):

Notice that range(start, end) creates a list from start (inclusive) until end (not inclusive).


The exact content will be determined, but these will be two to three short programming assignments, and possibly a longer, term-end assignment, that will build on material learned in the exercises.

You will earn points along several tracks. Each track is worth up to 100 points. Your must progress along ALL tracks to be successful in this course. Your final grade is the based on the lowest score earned along any track.

Attendance 0-100 points. Your attendance score is a straight percentage of class sessions you are present for. Programming Quizzes (8) 34 + 10 points each for quizzes 1 through 5, and 3 points each for quizzes 6 through 8. Exercises (9) 0 points for exercises from Chapter 2, 3, and 4, which are structured as practice quizzes. 1 bonus point each (6 total) added to the Programming Quizzes track for exercises from Chapter 5 on. DataCamp (4) 60 + 10 points for each course completed fully. Courses must be completed on time. 1 point will be deducted for each day late, to a minimum of 5 points for courses completed 5 or more days late. The date on the certificate of completion will be used so that you are not penalized if you complete the course on time but forget to submit the certificate. Python Package Tutorial 70-100 points. The tutorial will be awarded up to 30 points based on requirements announced separately. Since each tutorial will happen on a specifically scheduled day, this assignment cannot be revised for a higher grade. Programming Assignments (3) 70 + 10 points for each assignment.


Geography (GEOG)

This course uses parks and protected areas - both in the U.S. and globally - as a framework for exploring broad themes of sustainability, conservation, and socio-ecological systems. Case studies that exemplify U.S. and international parkscapes (i.e., parks and protected areas embedded within complex landscapes) are used to convey stories of evolving attitudes and approaches toward conservation and sustainability. These stories help explain the historical, transitioning, and future role of conservation in societies shaped by local ecologies, conflict, and change. The unique geographies of conservation parkscapes- past and future -reinforce and challenge a globally dynamic conservation discourse. Examining the sustainability of conservation activities themselves, as well as the socio-ecological systems in which they are embedded, can provide a lens through which we can begin to understand other cultures, aesthetic values and value systems, and the diverse ecologies of Earth. In this course, we will: - Explore the history of parks and protected areas globally, including the development of the U.S. National Park system, and the globalization of conservation and sustainability policies and approaches - Examine globally representative case-studies to assess how parks and protected areas are part of both social and ecological landscapes ("parkscapes") - Assess new challenges and opportunities for conservation in an era of rapid change and conflict - Evaluate the history, current socio-ecological condition, and future approaches in sustainability for a particular global parkscape By the end of the course students should be able to: - Describe why the idea of `wilderness' is both influential and contested - Explain temporal and spatial trends in national and international conservation management - Compare and contrast contemporary conservation approaches - Illustrate a parkscape as a coupled socio-ecological system - Identify key drivers of future ecological change affecting conservation management

Bachelor of Arts: Natural Sciences

Bachelor of Arts: Social and Behavioral Sciences

International Cultures (IL)

United States Cultures (US)

General Education: Natural Sciences (GN)

General Education: Social and Behavioral Scien (GS)

General Education - Integrative: Interdomain

GenEd Learning Objective: Crit and Analytical Think

GenEd Learning Objective: Global Learning

GenEd Learning Objective: Integrative Thinking

This course explores various visions of the apocalypse and their relevance for addressing major contemporary social, ecological, and economic issues. These issues include global climate change, nuclear war, the growing refugee crisis, the breakdown of democratic governance, economic recession and forms of everyday violence and social fracture. Students will develop and employ critical and analytical thinking skills to engage a diversity of texts from the humanities (e.g., historical and literary accounts, graphic novels, films and other historical and contemporary media) and contemporary popular culture in order to situate these apocalyptic visions in particular historical, cultural, and political contexts. Students will utilize integrative thinking skills and an interdisciplinary geographic approach to connect these visions with contemporary social issues in order to consider how we might address these complex problems while imagining and actualizing alternative futures. Students will practice global learning, drawing on course material that engages U.S. and cross-cultural perspectives in recognition of the global reach of the interconnected social, economic, political, and cultural systems that shape humanity's shared fate.

International Cultures (IL)

United States Cultures (US)

General Education: Humanities (GH)

General Education: Social and Behavioral Scien (GS)

General Education - Integrative: Interdomain

GenEd Learning Objective: Crit and Analytical Think

GenEd Learning Objective: Global Learning

GenEd Learning Objective: Integrative Thinking

GenEd Learning Objective: Soc Resp and Ethic Reason

GEOG 3 introduces students to the multiple connections of people and the environment through the dynamics of food and the places where it is produced, processed, and consumed. It introduces an integrated human-environment perspective on food systems in the United States, with emphasis on the Northeast and Western U.S., as well as in diverse locations around the world. The course offers a global perspective on the major challenges and opportunities facing food systems, including the sustainability of agriculture, organization of global food systems and local food initiatives, food insecurity, and the influence of modern diets on human health. This course promotes critical thinking regarding key concepts in Environment and Society Geography such as coupled human-environment systems, the Anthropocene anthropogenic landscapes and domestication carrying capacity ecological footprint life-cycle analysis globalization urbanization, dietary change and land use soils and society environmental and social justice climate change and resilience agrobiodiversity and adaptive capacity human-environment interactions involving vulnerability regional analysis geography and culture of food systems development and food security and social-ecological systems. Students are encouraged to examine their role and responsibilities for the sustainability of the social-ecological systems we inhabit and to take action in their own lives to contribute to a more equitable and sustainable environment. The course will provide students with the opportunity to read, learn, and debate the ways in which humans value, use, affect, and are affected by small-scale and large-scale human-environment interactions. It will provide skills for the critical analysis and evaluation of the ways in which humans have transformed the environment in different parts of the world. Students will also learn how to assess what future pathways are sustainable and ethically sound. One key course goal is to help students increase their sensitivity, awareness, and knowledge concerning the global and international context of human interactions with nature. Upon completion of this course, students will be able to: 1. Survey and analyze environmental resources in relation to systems of food production, land use, and consumption 2. Survey and analyze how human food systems significantly alter the earth's environmental systems and landscapes 3. Use environment and society geography to understand the resilience of agri-food systems in contexts of climate change, human population changes, and socioeconomic, cultural and policy factors.

Bachelor of Arts: Natural Sciences

Bachelor of Arts: Social and Behavioral Sciences

General Education: Natural Sciences (GN)

General Education: Social and Behavioral Scien (GS)

General Education - Integrative: Interdomain

GenEd Learning Objective: Crit and Analytical Think

GenEd Learning Objective: Global Learning

GenEd Learning Objective: Integrative Thinking

GenEd Learning Objective: Soc Resp and Ethic Reason

The rapid evolution of digital mapping technology via personalized digital mapping applications and location-aware devices has completely transformed how we use place and space to make decisions about human and environmental problems. This course introduces the fundamentals of cartography, geographic information science, and associated technologies through mapping and spatial analysis to answer key human and environmental problems. The class explores the power and utility of geographic information to transform how we navigate, tell stories about data, and make decisions that impact people and the planet. The course also encourages students to become knowledgeable, critical, and ethical consumers of maps and geographic data produced by government agencies, industry, and the media. Hands-on laboratory exercises, individual creative mapping projects, and course lecture contents are designed to reveal the many ways in which geographic information can play a role in shaping contemporary society. In addition, key course elements focus on the diversity and growth associated with the geospatial industry, an industry that is expected to grow rapidly over the next twenty years. Students who successfully complete Geography 6N will be able to: - Describe and explain fundamental concepts in Geographic Information Science (GIScience) and related technologies for making maps and solving spatial analysis problems - Explain how and why organizations create and use geographic data, including reference, thematic, and imagery sources - Demonstrate geographic information literacy to identify the kinds of geographic information needed for a particular task, determine whether needed data are available, use relevant technologies to acquire data, and to interpret and explain maps of the data critically - Create digital thematic maps to tell stories about geographic phenomena


ArcPy for Python Developers using ArcGIS Pro

The global Geographic Information System (GIS) market is expected to by worth over ten billion dollars by 2023, and is growing at a huge rate.

Developers who are skilled with appropriate GIS software are already in high demand and the demand is growing.

At the GIS Stack Exchange - the spatial library for Python - the most questions asked are for ArcPy, which provides a Python API to Esri’s flagship product ArcGIS Desktop and its two main applications (ArcGIS Pro and ArcMap).

Consequently, there has never been a better time for Python developers to add ArcPy skills to their repertoire.

This course is primarily designed to introduce Python developers to the ArcPy classes and functions for working with ArcGIS Pro. It will also introduce them to many aspects of the ArcGIS Pro GUI, so that they are well placed to understand the requirements of the end users for the applications that they write.

While relatively little Python experience is needed to undertake the course, the Python classes and functions used may be easier to understand if you have already undertaken introductory Python training - such as the Learn Programming Academy’s Python Masterclass.

The course is also suitable for ArcGIS Pro end users who wish to learn ArcPy, but they may need to embark on a steep Python learning curve, if they have minimal skills in that language.

Most sections of this course can be taken in any order. You just need to download the data, and check that you have ArcGIS Pro and your Python IDE working first.

NOTE: Paid software is required to take this course.

The course requires only a Basic level license of ArcGIS Desktop (which includes ArcGIS Pro), and no extension products need to be licensed in order to complete all exercises.

If you do not have an ArcGIS Desktop license, then for about $100-150 per annum it is possible to use an Advanced level license and many of the extension products for non-commercial purposes (like taking this course!), via Esri’s ArcGIS for Personal Use program (details inside the course).

It is also possible to undertake a 21-day free trial of ArcGIS Pro (details also inside the course).

The recommendation is to take the 21-day free trial to get started.

This course starts by examining the various places that Python code can be used within the ArcGIS Pro application, and how Python code can be written using a Python IDE to interact with ArcGIS Pro as either a standalone script or a Python script tool.

You will then be taken on a tour of the most commonly used ArcPy functions and classes for geoprocessing, followed by tours of its modules for data access and mapping.

The scenarios chosen, to illustrate how each function and class is used, are derived from the presenter’s experience working with ArcPy and Python for almost 10 years, and with Esri software for 30 years.

Your instructor, Graeme Browning has been using the Esri software on a daily basis for over 30 years, 8 years of which he has spent using ArcPy. Graeme has also spent 18 years with Esri UK and Esri Australia working in different roles from Senior GIS Analyst to Technical Director.

He is also ranked in GIS Stack Exchange as the all-time, worldwide:

#5 user of all GIS products

Graeme has also received the Esri High Achievement Award by Jack Dangermond (President).

He has already developed nearly 20 one-day courses and half-day workshops for instructor-led delivery and along with that, nearly 20 eLearning video courses.

So if you're looking for the perfect instructor to teach you the best practices in learning ArcPy for Python, Graeme is the best one there is!

Key Topics to be covered are :

Using ArcPy and Python in multiple interfaces within and alongside ArcGIS Pro

Python Parser for Field Calculating and Labeling

Using ArcPy Modules, Classes and Functions

Working with the search, update and insert cursors of ArcPy’s Data Access Module (arcpy.da)

Performing GIS Inventory by Listing Data, Describing Data and Walking System Folders and Spatial Datasets

Using the Mapping module for map automation using project, map, layer, layout, map frame, extent, camera, spatial reference, text, graphics, legends, scale bars, north arrows, pictures and many other object classes

Working with Map Series to meet simple through to complex Map Book requirements

Finding your way around ArcGIS Pro’s very extensive ArcPy/Python documentation

Working with Point, Line and Polygon Geometries

Setting the Geoprocessing Environment

Getting and Setting Parameters for Python Script Tools

Exporting map layouts to PDF

Enrolling in this course is the best decision you can make!

The course focuses on teaching ArcPy in-depth from the basics through to advanced

It’s 3-4 times the length of any other ArcPy course, and designed to accommodate many more lectures and challenges on not just ArcGIS Pro, but also ArcMap

Plus, it teaches ArcPy for ArcGIS Pro which was only released in 2015, while other ArcPy courses typically use only the older ArcMap! You are getting the most up to date learning!

By the end of this course, you will have the necessary skills needed to become an expert in ArcPy using ArcGIS Pro and apply it to your own programs such as Map Automation and Geoprocessing.

The ideal student would be someone with a basic knowledge of Python who is eager to improve their skills and take them to the next level by learning ArcPy using ArcGIS pro.

The sooner you sign up for this course, the sooner you will have the skills and knowledge that would put you among the list of in demand Python developers!


Learning Geospatial Analysis with Python. Visit http://geospatialpython.com/ to get a 50% discount code. But hurry, the deal ends Jan 31, 2016.

In this post I will look at extracting point data from a CSV file and creating a Shapefile with the pyshp library. The data consists of the location of trees with various attributes generated by the Fingal County Council in Ireland. The data can be downloaded as a CSV file from dublinked.ie.

pyshp is a pure Python library designed to provide read and write support for the ESRI Shapefile (.shp) format and only utilizes Python’s standard library to achieve this. The library can be downloaded from https://code.google.com/p/pyshp/ and placed in the site-packages folder of your Python installation. Alternatively you can use easy-install…

NOTE: You should make yourself familiar with the pyshp library by visiting Joel Lawhead’s examples and documents here.

The full code is at the bottom of the post, the following is a walkthrough. When ready to go open your favourite editor and import the modules required for the task at hand.

We will use the getWKT_PRJ function discussed in a previous post.

Create an instance of the Shapefile Writer( ) class and declare the POINT geometry type.

Set the autoBalance to 1. This enforces that for every record there must be a corresponding geometry.

Create the field names and data types for each.

Create a counter variable to keep track of the number of feature written to the Shapefile.

Open the CSV file in read mode.

Loop through each row and assign each attribute in the row to a variable.

Set the geometry for each record based on the longitude and latitude vales.

Create a matching record for the geometry using the attributes.

Print to screen the current feature number and increase the counter.

Save the Shapefile to a location and name the file.

Create a projection file (.prj)

Save and run the script. The number of features should be printed to the console.

If you open the original CSV file you can see that there are also 33670 records. Navigate to the file location where you saved the Shapefile output. You should see four files shown below.

And just to make sure that the data is correct, here I have opened it up in QGIS.


Watch the video: ArcGis creating polygon grid Create Fishnet