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
@@ -11,25 +11,90 @@ This tool is a side effect of a project I have done for work. I have explored di
11
11
12
12
# System Requirements
13
13
14
-
This tool is developed and tested for ArcGIS Pro. I have tested for ArcGIS Pro 2.7.
14
+
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
15
16
-
Your python environment must be of 3.x (tested with 3.7, but I assume it works with 3.6 too).
16
+
The open location code library for Python must be installed in your python environment. The next section will explain how to do that.
17
17
18
-
The open location code library for Python must be installed in your python environment. In short
19
-
`pip install openlocationcode`. For detailed instructions: https://github.com/google/open-location-code/tree/master/python
18
+
# How to install
19
+
20
+
## Clone your Python Environment
21
+
22
+
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
+
- Open ArcGIS Pro
24
+
- Open the menu on the left ribbon
25
+
- Go to the Python section of the menu.
26
+
- Click on manage environment
27
+
- Clone your default environment. Give it a meaningful name and location. In my case, I am storing my custom ArcGIS Pro environment on `D:\arcgis-pro-envs`. The name of my environment is : `arcgispro-py3-plus-code`
28
+
29
+

30
+
31
+
Once cloning is over, select your new environment as your default environment when you want to use our tool. You will need to restart ArcGIS Pro.
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
+
40
+
`pip install openlocationcode`.
41
+
42
+
Once it is done, the command line should look like that.
43
+
44
+

45
+
46
+
For more instructions about the open location code API, go to: https://github.com/google/open-location-code/tree/master/python
47
+
48
+
# Creating a folder connection to the tool:
49
+
50
+
Create a folder connection, as per the screenshot below, and navigate where you have downloaded and extracted the tool.
51
+
52
+

53
+
54
+
You will then be able to access the tool
55
+
56
+

20
57
21
58
# How to use
22
59
23
60
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.
24
61
62
+
In order to use the tool, double click on the tool `Get Plus Code`
63
+
64
+

65
+
66
+
The tool with then guide you through the list of parameters to provide:
67
+
68
+

69
+
70
+
71
+
25
72
# How to contribute
26
73
27
-
This tool has been done in rush. Though is works, it does not match my standards or the industry standards in terms of unit testing or documentation.
28
74
If you want to help, or have any suggestion, log an issue, and a pull request if you feel bold enough. Just remember to be nice.
29
75
30
76
# Data Considerations
31
77
78
+
## Spatial Reference
79
+
32
80
Your input feature class must be using Lat / Long, on the spheroid WGS84. The wkid associated with that spatial reference system is 4326. The tool will send you a friendly error message otherwise.
33
81
34
-
The tool expects a field to populate in your input feature class. That field must be of type string. Its length must be longer than the number of characters request for the plus length + 1. This is because Plus Code will add an extra character '+' after the 8th character. The minimum field length must be 9. This is because even if you ask for a Plus Code encoded on 4 characters, the API still returns 9 characters: for example `86JW0000+`. I have not figured out if that's good or bad yet.
82
+
## Field constraints
83
+
84
+
The tool expects a field to populate in your input feature class. That field must be of type string.
85
+
86
+
Its length must be longer than the number of characters request for the plus length + 1. This is because Plus Code will add an extra character '+' after the 8th character.
87
+
88
+
The minimum field length must be 9. This is because even if you ask for a Plus Code encoded on 4 characters, the API still returns 9 characters (the 4 characters you aked 4 and four characters 0): for example `86JW0000+`. I have not figured out if that's good or bad yet.
89
+
90
+
Feel free to check out this link if you want to know about plus code levels: https://grid.plus.codes/. From there we can learn:
35
91
92
+
```
93
+
level=0 will force the grid precision to be two digit OLC codes (20° x 20°);
94
+
level=1 will force the grid precision to be four digit OLC codes (1° x 1°);
95
+
level=2 will force the grid precision to be six digit OLC codes (.05° x .05°);
96
+
level=3 will force the grid precision to be eight digit OLC codes (.0025° x .0025°);
97
+
level=4 will force the grid precision to be ten digit OLC codes (.000125° x .000125°). This is the default house level precision;
98
+
level=5 will force the grid precision to be eleven digit OLC codes (.000025° x .00003125°);
99
+
level=6 will force the grid precision to be twelve digit OLC codes (.000005° x 0.0000078125°);
0 commit comments