|
POST
|
Hi @Anonymous User, I'm thinking this isn't exactly a SQL question with a "def" statement. I think that's a Python function. You could use something like this as a field calculate function: def getComplaintCount(complaint1, complaint2, complaint3, complaint4, complaint5, complaint6, complaint7, complaint8, complaint9, complaint10):
compCount = 0
compCount += 1 if complaint1 != None else 0
compCount += 1 if complaint2 != None else 0
compCount += 1 if complaint3 != None else 0
compCount += 1 if complaint4 != None else 0
compCount += 1 if complaint5 != None else 0
compCount += 1 if complaint6 != None else 0
compCount += 1 if complaint7 != None else 0
compCount += 1 if complaint8 != None else 0
compCount += 1 if complaint9 != None else 0
compCount += 1 if complaint10 != None else 0
return compCount This simply checks if each value is null and adds 1 to the compCount variable if it is not null. If your complaint fields are not nullable strings, you'd want to replace the "None" with a ''.
... View more
01-14-2022
09:31 AM
|
0
|
1
|
1706
|
|
POST
|
This is called "Importing" since it has to convert it to a different format. The GDB doesn't store files like a directory in windows. It stores Feature Classes, Tables, Datasets, etc. So, importing a shapefile into a GDB creates a feature class. The link @CarlMorrison posted above explains how to import various formats.
... View more
01-14-2022
07:44 AM
|
0
|
0
|
2286
|
|
POST
|
I think you were asking why the data in the map wasn't imported into the project GDB right? Pro lets you do this work. You could choose to import the data or leave it where it is as @CarlMorrison indicated but you're wondering how to import an MXD as a map in the new Pro project without having to repoint every single layer. This isn't built in behavior. You'll even notice that if you copy a map from one project to another within Pro, it will retain the data connections to the old Project.
... View more
01-14-2022
07:22 AM
|
0
|
0
|
2304
|
|
POST
|
Ok, with graticules, you can set all the interval details and things in the settings as described in the link I provided. Check the original map to determine what interval you need to use. However, it sounds like your graticule might be using the same interval but they are about 200 ft off from the original map. This sounds like a different projection may have been used on the original map.
... View more
01-05-2022
07:43 AM
|
0
|
0
|
2358
|
|
POST
|
That is perplexing. I think the weekend could be solved by checking the weekday of the forecasted date and if weekday is 6 or 7, add 1 or 2 days respectively. About the holiday question, that's a bit harder to tackle. There are a variety of Holiday calendars. This post has a known list and then checks against that list to add days if needed. You could create a hosted layer that contains all of the holidays for your locality and add the dates for a year at a time before the first day of the year and then use it in a FeatureSet to check for Holidays.
... View more
12-29-2021
01:35 PM
|
0
|
0
|
4120
|
|
POST
|
When you say "grids" are you talking about a "graticule" that you have set up in the map layout? If so, you can use the instructions at that link to change the interval (the number of degrees or map units) between each grid line and adjust other settings to see if you can get it to more closely match. Another thought, if you already show a graticule on the map you're trying to overlay your new transparency on, you could print yours without the graticule or "grid" showing. As long as the comments by others about 100% print scaling are followed, the features on your map should align and you wouldn't need the "grid".
... View more
12-29-2021
12:41 PM
|
0
|
2
|
2400
|
|
POST
|
Have you updated the password in the connection set up in your ArcGIS Pro project? Right-click > Connection Properties.
... View more
12-29-2021
10:02 AM
|
0
|
0
|
723
|
|
POST
|
Kristin, I'm not sure what's going on with yours and I just realized yours is a hosted feature layer. We have a non-hosted enterprise feature layer. But here's what just fixed it for us. Remove the defaults on the layer and save Add the defaults back and save For us, we had to republish, but with yours being hosted, I'm not sure you can republish. But you could simply try removing the defaults and re-adding them.
... View more
12-29-2021
09:27 AM
|
1
|
2
|
10445
|
|
POST
|
We are just experiencing the same issue after upgrading our ArcGIS Enterprise to 10.9.1. It was working before the upgrade in Field Maps and is no longer working. This post indicates that it might be an issue with Editing Templates and that templates are only going to be supported for hosted feature layers. We have a lot of benefits of managing our own data in an enterprise GDB and don't like the thought of moving all of our enterprise data to the hosted environment. However, in my opinion, if it was working before, and now it's not, this would have needed a deprecation notice since we have lot's of workflows built on our enterprise feature services. Therefore, I think this feels like a bug.
... View more
12-28-2021
11:41 AM
|
6
|
0
|
10475
|
|
POST
|
The Day the Earth Stood Still Web Expired On September 30th, 2021, Let's Encrypt (a non-profit certificate authority) allowed one of their certificates to expire, causing any certificate that had it as part of it's chain to show as invalid. This caused quite a bit of mayhem but they did eventually issue a replacement and through reboots and other updates, most of the issue went away. Except for Python virtual environments installed with ArcGIS Pro. I started having some of my automated processes fail around this time and was not able to resolve them even though we had rebooted machines and servers and manually installed the new replacement certificates locally, but nothing worked. Here's a quick example of something that was failing: import arcpy, os, requests, json
logMessages = ''
r = requests.session()
r.headers.update({'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'})
body = ''' [out:json]
[timeout:120]
;
(
way
["highway"="service"]
(43.6192138,-116.4338378,43.6339976,-116.4136293);
);
out;
>;
out skel qt;'''
OSM_URL3 = 'https://overpass.kumi.systems/api/interpreter'
# reach out to the Overpass API to grab the data
try:
respSuccess = False
numTries = 0
while respSuccess == False and numTries <= 10:
numTries += 1
response = r.post(OSM_URL3, data=body, verify=True)
if response.status_code == 200:
respSuccess = True
logMessages += '''Requesting features from OSM:
Response Status: {}\n'''.format(response.status_code)
except requests.exceptions.RequestException as e:
logMessages += '{}\n'.format(e.args[0].reason)
print(logMessages) this would always produce a message like: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091) Because these processes were not priority, it took me a couple months to circle around to digging in a bit more. I just figured out the issue and I want to share because I feel like I only understood the watered-down version of how SSL Certificates work and it appears that my frustration stemmed from that partial understanding. Also, it affected my automation that relied on Python web requests to get data. How I thought certificate checking works I originally thought that a certificate just needed validated against some authority and then it would allow traffic to flow. Not How Certificates Are Verified How Certificates Actually Work (ish) My previous understanding caused me to feel stuck because I was experiencing SSL errors trying to download data using python requests and getting failures even though I was able to download the same data using a web browser or other client software. So why was Python the only environment indicating an invalid certificate? Because this is roughly how the verification process actually works. The crucial detail I was missing was that my own computer had a previously downloaded copy of the certificate and when Python was checking the one received from the remote server against the local, my local copy still showed it was expired. Almost Solved Once I understood this, I requested some help from my awesome System Administrator and was shown how to remove an expired certificate from my Windows Certificate Store and install the new one. I know, you're thinking I'm going to show you how to do that but I'm not because it didn't work and there's probably plenty of other sites that will teach you how to do that. I'm posting this because I literally couldn't find it anywhere. I concluded that Python must not be referencing the certificates in my operating systems certificate store and must use it's own. So I did an uninstall and a fresh install of ArcGIS Pro. This still didn't fix it! So I installed pro on another computer and tried to run the same bit of code on the same network connection. THIS WORKED! But why wouldn't my machine work? The Real Fix I did some research and fiddling and found indication that the Requests Library uses it's own certificate bundle (a new term for me) and it was stored at the location provided by running the following code: import requests
print(requests.certs.where()) So, knowing that ArcGIS Pro had already been reinstalled and it didn't help, the installer must not have replaced this file, it must have just checked it and moved on or appended data to it? Not sure there. Either way, I renamed the old one and put a copy of the cert found on the other machine after a new install and BAM! My machine could now perform a web request through Python without throwing an SSL error. The Easier Fix If you're having this same issue, you can most likely do an uninstall of ArcGIS Pro, then make sure to delete the certificate in the location indicated by the requests.certs.where() function before re-installing pro. I'm sure that it's not recommended to tweak too much with most of the items in a Conda virtual environment, but I have no need to have a custom virtual environment because I'm using only libraries that are already included when you install ArcGIS Pro. However, in this one instance, this did the trick. I'm hopeful that there's a better way to have a certificate in a virtual environment be updated by running a command and that someone may be able to shine some light on this topic.
... View more
12-08-2021
12:14 PM
|
2
|
3
|
19572
|
|
POST
|
I have the same question. I found that this documentation indicates that you can add "a thumbnail that is displayed when the tool is added to the Analysis gallery." However, I added a thumbnail to several scripts and they still show the default script icon in the gallery. I attempted re-adding them to the gallery after adding the thumbnails and that didn't solve the issue. I also added different types of thumbnails (jpg, png, etc) and that didn't help either. I'd really love for this to work as we are creating these tools for very new GIS users and the tool names need to be longer than can show in the gallery. It'd be nice to have that visual recognition that they are clicking on the right tool and not have them all look the same.
... View more
08-25-2021
03:00 PM
|
1
|
0
|
1210
|
|
POST
|
I have this same need. I think that this import/export custom ribbon functionality is only truly portable if it uses relative paths. I'm sure if you are just grouping common command buttons on a ribbon tab, this works great. But for script tools, it means we can't share them. I would love to be able to point some buttons to script tools within the project toolbox and create a ribbon for accessing them. Another awesome thing would be if you could select custom ribbons to include when sharing a project template.
... View more
07-21-2021
02:42 PM
|
0
|
0
|
1403
|
|
IDEA
|
I completely agree. I've set up a Project Template with some custom tools that interact with layers in the project for addressing workflows and we'd love to be able to have the pro template include the custom Ribbon we've made with all the tools grouped nicely as buttons.
... View more
07-19-2021
01:01 PM
|
0
|
0
|
999
|
|
POST
|
So it sounds like you'd like to modify your python script to not only set the "Exercised" column back to NULL but also to do something with valve size. I can't exactly tell from your question what you need to do with the "Valve Size" column. Perhaps, you are wanting to just reset the "Exercised" column to NULL for valves of a certain size? If that is the case, I would use an update cursor with a where clause. # set up an update cursor including any fields that you'll need updated or to determine what to update
with arcpy.da.UpdateCursor(fcPath, field_names=['UNITID', 'VALVESZ', 'Exercised'], where_clause='VALVESZ IN (6, 8, 10)') as cursor:
for valve in cursor:
if (valve[2] != None): # None is python's equivalent of NULL
valve[2] = None
cursor.updateRow(valve)
... View more
06-16-2021
10:15 AM
|
0
|
0
|
2013
|
|
POST
|
@ParhatM , I think that there's a simpler method to doing this if the schema of the feature classes and tables don't change every time. I'd say you could register the FC/Table once and then just use T-SQL to swap out the data in it on a regular basis through a SQL Agent Job or a script that executes a stored procedure in the database. I have described the process we use for this exact situation in this post. It allows our Feature Classes to be used as a standard EGDB feature class except that it is not to be edited through GIS Software. I have many of these and I don't have to spend any time updating them until someone requests a change to the field definitions.
... View more
02-18-2021
11:26 AM
|
1
|
1
|
4441
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-16-2025 09:52 AM | |
| 1 | 11-22-2024 10:56 AM | |
| 3 | 11-22-2024 10:40 AM | |
| 1 | 02-18-2021 11:26 AM | |
| 9 | 08-30-2023 09:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-12-2025
01:09 PM
|