Saturday 9 March 2024

Automatic Alignment Sheet in Arcgis Pro

- 0 comments
I'm demonstrating how to automatically create alignment sheet maps in ArcGIS Pro. In my youtube channel I have loaded a total video, how to do it.
[Continue reading...]

Saturday 26 June 2021

How to export Data Driven Pages into PNG with high Resolution

- 0 comments

Why do we need this? 

This process is needed mostly when the export is needed as a image file not as vector. And the default option need to be exported one by one. However ESRI offers an option in official documentation about this process.

How to do it step-by-step?


Step 1:
Copy these lines of python code and paste it into a text editor (Notepad, notepad++, sublime...etc).

mxd = arcpy.mapping.MapDocument("CURRENT")
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
arcpy.mapping.ExportToPNG(mxd, r"C:\Temp\ParcelAtlas_Page" + str(pageNum) + ".png")
del mxd

These codes are downloaded into official documentation of exporting data driven pages. Search in google "Export data driven pages" or click here.

Step 2:

Modify the code using custom resolution and modify path+name.

mxd = arcpy.mapping.MapDocument("CURRENT")
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
arcpy.mapping.ExportToPNG(mxd, r"C:\your_path\your_name" + str(pageNum) + ".png",resolution=400)
del mxd

Step 3:

Open python window into your arcmap project, paste this code and press enter. All your sheets will be exported into your working folder.




Extra Steps!

Export data driven pages with PageName using python scripts.


Step 4:
Open attribute table of the data driven layer, copy all records and paste into an excel sheets. Remove all unnecessary fields except (the field that you have used as Sort field and the field that you have used as a name field in data driven setup). My case, FID and ID which is the building number that im using as field name in data driven pages setup and FID as the sort field. 





Step 5:

Sort these two field using FID (be sure this field is marked as number), copy the ID field and paste as transposed in the same sheet.

Step 6:

Copy the transposed records and paste into Notepad++, replace all Tabs with Quote-Comma-Quote and replace all Slashes with underscore
tabs => ','
/ => _
Create a valid python list with name pageID:

pageID = ['9','11','8','7b','7a','6_4','6_3','6_2','6_1','12_1','12_2','10_1','10_2','10_3','5','4','3','2','1']


Step 7:
Modify the final script, copy all script and paste into python window:

pageID = ['9','11','8','7b','7a','6_4','6_3','6_2','6_1','12_1','12_2','10_1','10_2','10_3','5','4','3','2','1'] mxd = arcpy.mapping.MapDocument("CURRENT") for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum arcpy.mapping.ExportToPNG(mxd, r"C:\Users\User\Desktop\test\png\{}".format(pageID[pageNum])+ ".png"),resolution=300) del mxd


Youtube Video:

[Continue reading...]

Monday 10 May 2021

Python Snippets in ArcGIS

- 0 comments

 What is Python Snippets?

Snippets code it is a paragraph of code that ArcGIS automatically generates for a specific tool or process. Than you can copy this code, incorporate into your script and make further changes for completing your application.

Why do we use Python Snippets?

Snippets code can help you develop your script faster. You dont need to check other documentation or any API's for using that code. Because ArcGIS with export the code block into an easy understandable code for incorporating it into your code.

How do we use Python Snippets?

This is the most important part of this post. There are two away to use python snippets code in ArcGIS.

1- For any task that we apply there is a geoprocessing result, in this table we can get snippets code.
Steps:
- Apply a testing Geoprocessing Task.
- Click Geoprocessing Menu.
- Click Geoprocessing Result
- Find the latest process that we just executed
- Right click to this task and choose Copy Python Snippets
- open a text editor and paste the code.

2 - Second away has to do with Model Builder. You have to create a model for your tasks and in the end choose File-save as Python file.
By this away ArcGIS will create you a python file with all used parameters and processing.

For more details check this video:

[Continue reading...]

Sunday 10 January 2021

Python Scripting for ArcGIS Pro 2020

- 0 comments

Python Scripting for ArcGIS Pro

by Paul A. Zandbergen

 

The definitive, easy-to-follow guide to writing Python code with spatial data in ArcGIS Pro, whether you’re new to programming or not.


Python Scripting for ArcGIS Pro starts with the fundamentals of Python programming, and then dives into how to write useful Python scripts that work with spatial data in ArcGIS Pro. Learn how to execute tools in Python, describe data, and manipulate and create data, as well as a number of more specialized tasks. Create a geoprocessing tool out of your script to automate tasks in ArcGIS Pro, and learn how to share your tools with others. 

Some of the key topics you will learn include:

• Python fundamentals

• Automating geoprocessing tasks

• Exploring and manipulating spatial and tabular data

• Working with geometries and rasters

• Map scripting

• Debugging and error handling

• Creating functions and classes

• Creating and sharing script tools

• ArcPy and ArcGIS API for Python 

Helpful “points to remember,” key terms, and review questions are included at the end of each chapter to reinforce your understanding of Python. Corresponding data and exercises are available online. 

Whether you want to learn Python or already have some experience, Python Scripting for ArcGIS Pro is the comprehensive, hands-on book for learning the versatility of Python coding as an approach to solving problems and increasing your productivity in ArcGIS Pro.



Download
download #2
download #3
[Continue reading...]

Tuesday 5 January 2021

MapInfo 12 Free Download

- 0 comments

MapInfo 12 Free download


Use above links to download Mapinfo 12


Download
download #2
download #3
[Continue reading...]

Sunday 27 December 2020

Step-by-Step Guide to Vulnerability Hotspots Mapping (PDF Download)

- 0 comments

Step-by-Step Guide to Vulnerability Hotspots Mapping: Implementing the Spatial Index Approach (ArcGIS and R)

Authors: Malanding S Jaiteh, Tricia Chai-Onn, Valentina Mara, Alex de Sherbinin


This manual was designed for a five-day training program in Entebbe, Uganda, in August 2015. CIESIN provided a comprehensive training in the framework, data and methods utilized to develop a spatial vulnerability assessment for Kenya using the spatial index approach. Data sets and potential indicators to be derived from them were assembled and evaluated in advance of the workshop. The workshop’s primary focus was on the methods needed to process and transform the spatial data in order to develop a spatial vulnerability index (and constituent indices for exposure, sensitivity, and adaptive capacity). The workshop was intended for GIS analysts who regularly use ArcGIS 9.x or later versions, who are broadly familiar with a variety of geospatial data formats, and who have the ability to do advanced geospatial processing (e.g., editing data sets, creating buffers, conducting overlay analyses, running zonal statistics, etc.). While vulnerability index maps can be produced entirely in ArcGIS environment, we use R statistical computing and graphics software for the component of part in this training. R is a free software with a wide variety of statistical and graphical techniques that have proven to be very efficient in handling large data sets as the one we encounter in spatial vulnerability index mapping. The workshop was divided into the following modules, which are addressed in greater detail in the lectures and exercises that follow.



[Continue reading...]

Friday 25 December 2020

How to remove ESRI Basemap Credits in ArcGIS

- 0 comments

 How to remove Esri Basemap Credits in ArcGIS?

In this post you can find the easy steps to follow for removing or modifying the service source layer of an any WMS. Particularly the text in the picture 1. However by my experience it is not a good idea to hide sources because if a WMS is free in internet mean that you can use that layer for your project. Personally I never remove the source service layer credits but in the most of cases I move it from the original place and I change the font size and color.

Steps:

Switch the ArcGIS into Layout. 


Click Insert - Dynamic Text - Service Layer Credits




Once you click that menu, you can see that the text of Service Layer it is divided from the layout and you can move it (modify, change size,color) and if you just move the text outside of the Layout space it will not be displayed in printed map (or PDF export).







Thats all, for video of this issue you can check the link below:







[Continue reading...]

Thursday 24 December 2020

First Post

- 0 comments

 Hello World



[Continue reading...]
 
Copyright © . Geospatial Guy - Posts · Comments
Theme Template by BTDesigner · Powered by Blogger