ArcPY - Python
Follow
Find
37.7K views | +9 today
 
ArcPY - Python
Information and Tutorials about ArcGis Python
Your new post is loading...
Your new post is loading...
Scooped by Elpidio I F Filho
Scoop.it!

Copy dbf data into a shapefile in Arcpy - User Answer To Computing Errors

Copy dbf data into a shapefile in Arcpy - User Answer To Computing Errors | ArcPY - Python | Scoop.it
... (#facebook: Copy dbf data into a shapefile in Arcpy -... http://t.co/asfv1t19nb #answer)
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

What's New in ArcPy at ArcGIS 10.1 (and 10.2)? | Happenic

What's New in ArcPy at ArcGIS 10.1 (and 10.2)? | Happenic | ArcPY - Python | Scoop.it

Learn about the key enhancements to ArcPy at ArcGIS 10.1 (including SP1 and 10.2), and how to apply them in your day-to-day work.

This one-day course is taught by an ArcGIS Geoprocessing and Python Specialist with 25+ years of experience. It builds upon skills learned in introductory Python for Geoprocessing and Mapping courses and is designed for GIS analysts and specialists, who want to extend their ArcPy and Python skills to customise ArcGIS for geoprocessing, mapping and data access by taking advantage of the features and workflows new to ArcGIS 10.1.

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

10 tendencias de futuro en GIS

10 tendencias de futuro en GIS | ArcPY - Python | Scoop.it
Desde el lanzamiento de ArcInfo en 1982 hasta Torque de cartoDB en 2013, ha habido una clara evolución en los SIG. La visualización de datos geográficos es cada vez más sencilla y accesible a cualquier persona.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Los 10 formatos GIS vectoriales más populares

Los 10 formatos GIS vectoriales más populares | ArcPY - Python | Scoop.it
En esta entrada vamos  dar un repaso a los formatos GIS más populares y extendidos con los que trabajar en un proyecto GIS.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Cómo depurar código Python con PyScripter

Cómo depurar código Python con PyScripter | ArcPY - Python | Scoop.it
En este post vamos a daros las claves para aprovechar el uso de PyScripter como editor de código de Python para ArcGIS, tanto para escribir código como para la detección y corrección de errores de programación.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Publishes all mxd files in a folder to running arcgis services.

Publishes all mxd files in a folder to running arcgis services. - Gist is a simple way to share snippets of text and code with others.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Creating a quarter quarter section grid with Python

Creating a quarter quarter section grid with Python | ArcPY - Python | Scoop.it
At work I was tasked with creating a quarter quarter section grid for Nebraska because the BLM didn’t have one available. They did have the Township/Range and section grid though.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

ArcPy.Mapping and ArcPy.Time Reference

ArcPy.Mapping and ArcPy.Time Reference | ArcPY - Python | Scoop.it
This is an offline reference for the ArcPy.Mapping and ArcPy.Time modules in PDF format. It includes classes, functions and constraints. I tried to organize it in a way which allows for navigation throughout it just by clicking.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

ArcPy and ArcPy.Da Reference - Ian Broad

ArcPy and ArcPy.Da Reference - Ian Broad | ArcPY - Python | Scoop.it
An offline reference for the ArcPy and ArcPy.Da modules and environment settings. Includes classes, functions, and constraints.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Clip, Zip and Ship your image service, using Python | ArcGIS Resource Center

Clip, Zip and Ship your image service, using Python | ArcGIS Resource Center | ArcPY - Python | Scoop.it

Here is a Python sample that can be used to clip items from your image service, package them into a mosaic dataset with all the metadata field values, and then ship them to a client or colleague. As with all other code samples that we add to our gallery, it is meant to help show you how something can be done in code; the actual implementation may need some altering in order for it to work for your particular example.

 

Description:
This python sample application accepts a input image service layer or URL as input. You can draw a polygon feature to define an area on the image service that you want to clip.

 

The program will start creating a local mosaic dataset with all metadata field recovered from the image service. And then it will download the image service item one by one according to the geometry of the polygon, and clip the image using the polygon.

You also have the option to clip the image using the default raster function if there is any. And you can also define the output image’s cell size.

 

The downloaded image will be added back to the local mosaic dataset along with all the metadata field values from the image service.

 

Note:
This python scripting tool uses the 10.1 Image Server REST API. Some of the functionality, such as define output image spatial reference in the ExportImage REST request is not available in 10.0. This is only a sample, and you may need to alter it, order for it to work for your particular case.

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Field mapping and Python scripting | ArcGIS Resource Center

Field mapping and Python scripting | ArcGIS Resource Center | ArcPY - Python | Scoop.it

A number of geoprocessing tools including Spatial Join (Analysis), Append (Management), Merge (Management), Feature Class To Feature Class (Conversion), and Table To Table (Conversion), have a parameter for controlling how fields from the input dataset(s) are processed and written, or mapped, to the output dataset – the Field Map parameter. In addition to the simple moving of attributes from input to output, field mapping can also be useful for some common tasks such as field concatenation and calculating statistics like mean, sum, and standard deviation.

 

If you haven’t used the Field Map before, you should! Understanding and using field mapping will often reduce the number of processing steps in a workflow, and ensure that, in any scenario, attributes are handled in an appropriate way. Yes, the Field Map parameter is a complicated one, but it is well worth the time it takes to figure it out.

Because the Field Map is a complicated parameter, working with it in Python can also be complicated. The best way to interact with field mapping in Python scripting is with the FieldMappings object. In Python, most geoprocessing tool parameter types are seen as simple numbers or strings (specifying a feature class input is as easy as providing the feature class’ path). But several of the more complex parameters have objects that exist to help you effectively work with the parameter. The Field Map parameter can accept a long structured string indicating the field map settings (you may have seen this long string equivalent in geoprocessing messages), however, working with the field mapping string is inefficient and error-prone, so use the FieldMappings object for the best experience.

 

Problem

I was recently presented with a data migration problem where field mappings and Python scripting literally saved me weeks of work. The goal was to convert a collection of hundreds of VPF (Vector Product Format) databases containing many feature classes to a handful of geodatabases, and because of the large scale of the migration it had to be accomplished in an automated fashion (this is where the many weeks of work would be saved). The schema of the geodatabases was already set up with a number of feature datasets and empty feature classes into which the VPF feature class data would be imported using the Append (management) tool.

The iteration through the collection of VPF databases was solved with some simple looping techniques involving the arcpy.ListDatasets() and arcpy.ListFeatureClasses() functions. However, there was a fundamental problem that nearly derailed the automation of this process: VPF feature classes can have spaces in their field names, while geodatabase datasets cannot. When the empty geodatabase feature classes were created from the schema of the VPF feature classes, the spaces in the field names were automatically changed to underscores ( _ ) in the geodatabase feature classes. This very subtle difference caused huge ripples in the automated process, since the Append (Management) tool can not automatically match fields like ‘mcc description’ to ‘mcc_description’; in the output geodatabase feature class, all the values in the ‘mcc_description’ field are NULL because the fields were not matched.

 

 

 

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Another GIS Blog: Setup WING IDE for ArcPy 10.1

I've changed python IDE to WING. It's a very nice IDE, but it took sometime getting use to from pydev's eclipse add on.

Here is the basic setup of WING IDE with PyLint:

1. Download easy_install: http://pypi.python.org/pypi/setuptools/#windows
2. Install easy_install
3. Go to the install location of Python 2.7.x and run 'easy_install pylint'
4. Install WING IDE
5. Start WING IDE
6. Select Tools -> PyLint
7. Right click on the PyLint window and select 'configure'
8. Edit the 'command =' to be 'command = C:\Python27\ArcGIS10.1\Scripts\pylint.bat'
9. Run pylint on a .py file

* if you get an error, try adding the full

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

High Quality Printing with ArcPy « Dekho Resource Center

High Quality Printing with ArcPy « Dekho Resource Center | ArcPY - Python | Scoop.it

With some minor tweaks to the existing ArcPy print sample for Dekho, you can point the script at your source data as opposed to the map services that have references to the source data.

This not only improves the quality (as the map services ‘rasterise’ the raw data), but also dramatically speeds up the process.....

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Python subset xls in ArcMap - YouTube

Example of how you can use Python Excel to subset a spreadsheet based on spatial extent of ArcMap.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

8 consejos para comenzar a trabajar con Python sobre ArcGIS

8 consejos para comenzar a trabajar con Python sobre ArcGIS | ArcPY - Python | Scoop.it
Comenzar a trabajar con Python sobre ArcGIS es más sencillo de lo que parece. En anteriores post ya hemos explicado como ejecutar código de Python y en que consiste la Arcpy.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

10 habilidades para usar eficazmente un SIG

10 habilidades para usar eficazmente un SIG | ArcPY - Python | Scoop.it
En esta entrada vamos a presentar 10 habilidades que debe tener un técnico GIS para usar eficazmente un Sistema de Información Geográfico: Conocer todos los tipos de archivos o formatos GIS que existen, sus fortalezas y debilidades.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Primeros pasos con ArcGIS Online

Primeros pasos con ArcGIS Online | ArcPY - Python | Scoop.it
En este artículo explicaremos qué es ArcGIS Online, qué puedes hacer con él, cómo comenzar a utilizarlo, crearemos un mapa web y una aplicación web mapping utilizando una cuenta pública gratuita y añadiremos los mapas que has creado con ArcGIS...
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Python in Hydrology

Python in Hydrology | ArcPY - Python | Scoop.it

Python in Hydrology is written for learning Python using its applications in hydrology. The book covers the basic applications of hydrology, and also the advanced topic like use of copula.

The book is available under the GNU Free Documentation License. Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material.

If you have comments, corrections or suggestions, please send me email atsatkumartomer@gmail.com

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Cómo crear PDFs que contienen mapas empleando la librería PyFPDF de Python

Cómo crear PDFs que contienen mapas empleando la librería PyFPDF de Python | ArcPY - Python | Scoop.it
La librería PyFPDF es una forma sencilla de crear PDFs que incluyen mapas; tal como refiere Joel Lawhead en su libro de Learning Geospatial Analysis with Python.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Creating a quarter quarter section grid with Python

Creating a quarter quarter section grid with Python | ArcPY - Python | Scoop.it
At work I was tasked with creating a quarter quarter section grid for Nebraska because the BLM didn’t have one available. They did have the Township/Range and section grid though.
more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

1174 introducing the arcpy data access module 960

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Building feature classes from NumPy arrays

Building feature classes from NumPy arrays | ArcPY - Python | Scoop.it
With ArcGIS 10.1, a NumPy array can be easily converted into a point feature class using the arcpy.da.NumPyArrayToFeatureClass function.

 

Notable is that other geometry types such as Polygon, Polyline or Multipoint are not supported by NumPyArrayToFeatureClass. However, all the tools needed to create other geometry types from NumPy are there. The numpy_array_to_features function below combines the new arcpy.da.InsertCursor and NumPy methods to turn a NumPy array into features.......

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

A simple approach for including 3rd party Python libraries with your scripts | ArcGIS Resource Center

A simple approach for including 3rd party Python libraries with your scripts | ArcGIS Resource Center | ArcPY - Python | Scoop.it

Often times, your Python scripts require 3rd party Python libraries. For example, the sample tools located here: http://www.arcgis.com/home/item.html?id=f3d91b8f852042e289e09a7ec8342431 requires xlrd, xlwt, and openpyxl Python libraries. This sample includes all of the dependent libraries, and demonstrates just how easy it is.

 

The secret to most Python modules and packages: they’re just files. You can copy any Python library into the same folder as the .py file that imports them and it will just work (Note: in the case of C extensions and compiled bytecode, the Python version and architecture must match). Here is the layout of the folder with the libraries we mentioned before:

 

Finding the install location of a library

 

Usually the Python library is located in the site-packages folder within the Python install directory, however, if it is not located in the site-packages folder and you are uncertain where it is installed, here is a Python sample to locate Python modules installed on your computer.....

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

ArcGIS 10.1 arcpy Wall Reference Poster

ArcGIS 10.1 arcpy Wall Reference Poster | ArcPY - Python | Scoop.it

This is an automatically generated diagram of arcpy as it is shipped in ArcGIS 10.1. This document is not the official reference: please refer to the ArcGIS 10.1 online help for an accurate, complete, actively maintained source of documentation. arcpy is big: a piece of paper with full of boxes of names out of context will not be as useful as the official help with explanations and code samples.

more...
No comment yet.
Scooped by Elpidio I F Filho
Scoop.it!

Getting arcpy.da rows back as dictionaries

Getting arcpy.da rows back as dictionaries | ArcPY - Python | Scoop.it
Though arcpy.da‘s cursors return rows as lists, you can easily transform these on-the-fly with just a little code on your part: Or if you’d like to be able to use a syntax similar to th...
more...
No comment yet.