You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-9Lines changed: 49 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,30 @@
1
1
# ArcGIS Pro Plus Code Generator
2
2
3
+
## Table of content
3
4
4
-
# Description
5
+
*[Description](#description)
6
+
*[System Requirements](#sys-requirements)
7
+
*[How to Install](#install)
8
+
*[How to use](#how-to)
9
+
*[Tutorial: Generating a grid and its Plus Codes](#tutorial)
10
+
11
+
## <aname="description"></a>Description
5
12
6
13
This tool exposes the open location code API create by google and uses it to generate Plus Codes on ArcGIS feature classes. The API documentation is there: https://github.com/google/open-location-code
7
14
8
15
Detailed information about Plus Codes and the KML Service that Google Provides can be found there: https://grid.plus.codes/
9
16
10
17
This tool is a side effect of a project I have done for work. I have explored different solutions with FME and QGIS, but this was by far the fastest solution. It can generate plus code on points, and polygon feature classes.
This tool is developed and tested for ArcGIS Pro. I have tested for ArcGIS Pro 2.7. Your python environment must be of 3.x (tested with 3.7, but I assume it works with 3.6 too).
15
22
16
23
The open location code library for Python must be installed in your python environment. The next section will explain how to do that.
17
24
18
-
#How to install
25
+
## <aname="install"></a>How to Install
19
26
20
-
## Clone your Python Environment
27
+
###Clone your Python Environment
21
28
22
29
Open ArcGIS Pro, and bring up the menu. That will let you access your Python options, and create a new Python environment. We need that since we need to install the open location code API, and that won't be allowed in ArcGIS Pro's default environment.
23
30
- Open ArcGIS Pro
@@ -33,7 +40,7 @@ Once cloning is over, select your new environment as your default environment wh
Open a command line prompt, and use the `cd` command to navigate in the subdirectory of your newly created environment. In my case: `D:\arcgis-pro-envs\arcgispro-py3-plus-code\Scripts`. Then run the following command line:
39
46
@@ -45,7 +52,7 @@ Once it is done, the command line should look like that.
45
52
46
53
For more instructions about the open location code API, go to: https://github.com/google/open-location-code/tree/master/python
47
54
48
-
# Creating a folder connection to the tool:
55
+
###Creating a folder connection to the tool:
49
56
50
57
Create a folder connection, as per the screenshot below, and navigate where you have downloaded and extracted the tool.
51
58
@@ -55,7 +62,7 @@ You will then be able to access the tool
55
62
56
63

57
64
58
-
#How to use
65
+
## <aname="how-to"></a>How to use
59
66
60
67
Use the tool box in ArcGIS Pro. There is built-in help in the tool metadata, and the tool is configured to guide you and minimize input errors.
61
68
@@ -65,7 +72,7 @@ In order to use the tool, double click on the tool `Get Plus Code`
65
72
66
73
The tool with then guide you through the list of parameters to provide:
67
74
68
-

75
+

69
76
70
77
71
78
@@ -97,4 +104,37 @@ level=3 will force the grid precision to be eight digit OLC codes (.0025° x .00
97
104
level=4 will force the grid precision to be ten digit OLC codes (.000125° x .000125°). This is the default house level precision;
98
105
level=5 will force the grid precision to be eleven digit OLC codes (.000025° x .00003125°);
99
106
level=6 will force the grid precision to be twelve digit OLC codes (.000005° x 0.0000078125°);
100
-
```
107
+
```
108
+
109
+
## <aname="tutorial"></a>Tutorial - Generate a Grid at level 3 and compute the Plus Codes of the polygons
110
+
111
+
ArcGIS Pro is a powerful piece of software. You can use some built-in tools to generate a grid representing plus codes areas and compute the plus code for the centroid of each polygon using the tool we provide.
112
+
113
+
We're going to use the tool `Create Fishnet`. The full documentation can be found here: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-fishnet.htm
114
+
115
+
In our tutorial, let's generate a level 3 grid for Ottawa, ON, Canada.
116
+
117
+

118
+
119
+
Be sure in the section `Environments` to search your spheroid to be WGS84 (you can search by wkid, using the code 4326)
120
+
121
+

122
+
123
+
This will generate our grid for Ottawa:
124
+
125
+

126
+
127
+
Use the Add Field tool. Here we have level 3 polygon, so the encoding requires 8 characters, and an additional character `+`. So our field length is 9:
128
+
129
+

130
+
131
+
Then use our tool to populate the new field named `PLUS_CODE`:
0 commit comments