|
POST
|
Hi Greg, Download the connector from the following link. The symbology is saved in the WebMapAsJSON directory within that zip. On page 21 of the ArcGIS GeoEvent Serer - Waze Connector.pdf will show you how to implement.
... View more
03-03-2023
03:45 AM
|
1
|
3
|
2540
|
|
POST
|
Hi Emma, I second Kepa's idea of using the append method. Take a look at the following script. It may give you what you need. https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457
... View more
03-03-2023
03:39 AM
|
0
|
0
|
2752
|
|
POST
|
Hi Jort, I recommend generating the token each time you are making a post request. Python Ex: import requests, json
# Generate Token
tokenURL = 'https://www.arcgis.com/sharing/rest/generateToken'
params = {'f': 'pjson', 'username': username, 'password': password, 'referer': 'http://www.arcgis.com'}
r = requests.post(tokenURL, data = params, verify=False)
response = json.loads(r.content)
token = response['token']
# Post Request
.....
... View more
03-03-2023
03:33 AM
|
1
|
0
|
1570
|
|
POST
|
Hi Emil, I would first add fields to your polygon grid (i.e. Shapefile1, Shapefile2, etc). Then, set up modelbuilder to select the polygon grid's feature that overlap shapefile1 (i.e. via Select Layer by Location). After the Select Layer By Location perform a calculation for Shapefile1 field, and calculate this value to Yes. You can then duplicate this process for each shapefile.
... View more
03-02-2023
08:36 AM
|
0
|
0
|
924
|
|
DOC
|
@MonikaSamorajska See below, I removed the toEmail variable under the # Variables section. I also added line 92: toEmail = feat['attributes']['email'] Replace 'email' with the name of the field containing the email addresses. import requests, json, datetime, time, smtplib
from datetime import timedelta
from email.mime.text import MIMEText
# Disable warnings
requests.packages.urllib3.disable_warnings()
# Variables
username = 'jskinner_CountySandbox' # AGOL Username
password = '*******' # AGOL Password
URL = 'https://services.arcgis.com/dlFJXQQtlWFB4qUk/arcgis/rest/services/CitizenProblems/FeatureServer/0' # Feature Service URL
dateField = 'CreationDate' # Date field to query
hoursValue = 1 # Number of hours to check when a feature was added
fromEmail = '[email protected]' # Email sender
receiver(s)
smtpServer = 'smtp.esri.com' # SMTP Server Name
portNumber = 25 # SMTP Server port
# Function to send email
def sendEmail():
SUBJECT = 'Problem Reported'
TEXT = "{0} was created with status {1}".format(typeProb, status)
smtpObj = smtplib.SMTP(host=smtpServer, port=portNumber)
msg = MIMEText(TEXT)
msg['Subject'] = SUBJECT
msg['From'] = fromEmail
msg['To'] = ", ".join(toEmail)
smtpObj.sendmail(fromEmail, toEmail, msg.as_string())
print("Successfully sent email")
smtpObj.quit()
# Generate AGOL token
try:
print('Generating Token')
tokenURL = 'https://www.arcgis.com/sharing/rest/generateToken'
params = {'f': 'pjson', 'username': username, 'password': password, 'referer': 'http://www.arcgis.com'}
r = requests.post(tokenURL, data=params, verify=False)
response = json.loads(r.content)
token = response['token']
except:
token = ''
# Return largest ObjectID
whereClause = '1=1'
params = {'where': whereClause, 'returnIdsOnly': 'true', 'token': token, 'f': 'json'}
r = requests.post(URL + '/query', data = params, verify = False)
response = json.loads(r.content)
try:
response['objectIds'].sort()
except Exception as e:
print("Error: {0}".format(e))
count = len(response['objectIds'])
# Query service and check if CreationDate time is within the last hour
if count < 1000:
params = {'f': 'pjson', 'where': "1=1", 'outFields' : '*', 'returnGeometry' : 'false', 'token' : token}
r = requests.post(URL + '/query', data=params, verify=False)
response = json.loads(r.content)
for feat in response['features']:
typeProb = feat['attributes']['probtype']
status = feat['attributes']['status']
createDate = feat['attributes'][dateField]
createDate = int(str(createDate)[0:-3])
t = datetime.datetime.now() - timedelta(hours=hoursValue)
t = time.mktime(t.timetuple())
if createDate > t:
sendEmail()
else:
y = minOID
x = minOID + 1000
ids = response['objectIds']
newIteration = (math.ceil(iteration/1000.0) * 1000)
while y < newIteration:
if x > int(newIteration):
x = newIteration
where = OID + '>' + str(y) + ' AND ' + OID + '<=' + str(x)
print('Querying features with ObjectIDs from ' + str(y) + ' to ' + str(x))
params = {'f': 'pjson', 'where': where, 'outFields' : '*', 'returnGeometry' : 'false', 'token' : token}
r = requests.post(URL + '/query', data=params, verify=False)
response = json.loads(r.content)
for feat in response['features']:
typeProb = feat['attributes']['probtype']
status = feat['attributes']['status']
toEmail = feat['attributes']['email']
createDate = feat['attributes'][dateField]
createDate = int(str(createDate)[0:-3])
t = datetime.datetime.now() - timedelta(hours=hoursValue)
t = time.mktime(t.timetuple())
if createDate > t:
sendEmail()
x += 1000
y += 1000
... View more
03-01-2023
09:04 PM
|
0
|
0
|
13899
|
|
POST
|
You can run the WebGISDR during business hours. It will not affect ArcGIS Enterprise.
... View more
02-14-2023
11:57 AM
|
0
|
3
|
4998
|
|
POST
|
The public accounts can be converted as named users within your Organization. https://doc.arcgis.com/en/arcgis-online/get-started/join-org.htm#ESRI_SECTION1_73A22DB113B7429B91101EA4D8A8E835
... View more
01-31-2023
05:39 AM
|
0
|
1
|
2567
|
|
DOC
|
@justin_peterson I just replaced the password with asterisks so it is hidden in the above example. You will need to enter the password in clear text. You could use base64 to encode the password, and enter that for the password variable. You would then need to decode the string to use it successfully within the script. This will prevent should-surfers from viewing your password when the script is open. https://www.tutorialspoint.com/cryptography_with_python/cryptography_with_python_base64_encoding_and_decoding.htm
... View more
01-31-2023
05:37 AM
|
0
|
0
|
29671
|
|
POST
|
Hi Leanne, Unfortunately, it is not possible to invite a public account user to join an organizational group, without being a member of that organization, or being a member of a different organization.
... View more
01-30-2023
06:25 AM
|
0
|
1
|
2585
|
|
POST
|
Hi @Davec43, can you elaborate on what you are trying to do when you want to pull the layers out of the geodatabase? Are you looking to perform further processing on these feature classes?
... View more
01-23-2023
11:49 AM
|
0
|
1
|
2497
|
|
DOC
|
@NatalieRobbins in the new Map Viewer, select Add Content in the Pop-up pane, and then select Text: You can then format your text with supported HTML using the Source icon:
... View more
01-23-2023
11:38 AM
|
0
|
0
|
18714
|
|
POST
|
Hi @Chase_Mohrman , The images are stored in the DATA field as a Blob.
... View more
01-23-2023
11:30 AM
|
0
|
0
|
1651
|
|
DOC
|
@CharlottePeters95540 you need to be an Administrator in order to run this tool.
... View more
01-05-2023
06:02 AM
|
0
|
0
|
34600
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|