|
DOC
|
@berniejconnorsif ArcGIS Server is not federated with Portal for ArcGIS, then you can use any Administrator account. If ArcGIS Server is federated, then you will need to use the Primary Site Administrator account.
... View more
05-20-2021
06:53 AM
|
0
|
0
|
12199
|
|
DOC
|
@UalasRohrer yes, this tool works at 10.8. Are you authentication using the Primary Site Administrator account?
... View more
05-20-2021
04:18 AM
|
0
|
0
|
12210
|
|
DOC
|
@SarahHartholt yes, take a look at the following document on how to do this: https://community.esri.com/t5/python-documents/schedule-a-python-script-using-windows-task-scheduler/ta-p/915861
... View more
05-14-2021
05:55 AM
|
0
|
0
|
65796
|
|
POST
|
@Gisbert61the second coordinate system you see listed there is the geographic datum. Each projected coordinate system will have a geographic datum. So, this is normal what you're seeing. The multiple shape_length fields your seeing are most likely from multiple copy/pastes or export/imports. Only one will be updated, and you should not be able to delete this field (if the data is residing in a geodatabase). The other shape_length fields should be able to be deleted.
... View more
05-10-2021
06:13 AM
|
1
|
0
|
2109
|
|
POST
|
Is the Extract function configured for a hosted feature service, or an ArcGIS Server feature service?
... View more
05-07-2021
12:34 PM
|
0
|
0
|
1239
|
|
POST
|
Since you are deleting all features, I would recommend using the truncate method. This is much faster. Ex: hostedFS= gis.content.get(fsItemId)
fLyr = hostedFS.layers[0]
fLyr.manager.truncate()
... View more
05-07-2021
12:25 PM
|
0
|
1
|
3849
|
|
DOC
|
@RickeyFight reaction = str(feat['attributes']['reaction']).replace(u"\u2018", "'").replace(u"\u2019", "'")
... View more
05-07-2021
08:29 AM
|
0
|
0
|
16599
|
|
DOC
|
@RickeyFighttry the following: reaction.append(str(feat['attributes']['reaction']).replace(u"\u2018", "'").replace(u"\u2019", "'"))
... View more
05-07-2021
07:28 AM
|
0
|
0
|
16605
|
|
DOC
|
@RickeyFight For your e-mail text, try cleaning up the extra apostrophes. For example, you have: ReportedReaction = "'\nWhat was the animal Reaction?: " + str(reaction) Try this instead: ReportedReaction = "\nWhat was the animal Reaction?: " + str(reaction) You won't need any quotes around \n, as long as it's enclosed by quotes, python will read it is a new line. To remove the [] around the answers, you have two options: 1. Since you are appending to a list, you can specify the first value of the list using a [0]. Ex: Sighted = "\nAnimal Sighted : " + str(probtype)[0] 2. Instead of creating a list (i.e. probtype = []), you can remove this and set the probtype as a variable: probtype = (str(feat['attributes']['probtype'])) I would recommend the second option. In doing so, you should move everything within the for loop. This will allow separate e-mails to be sent in the event there is more than 1 feature added within the allotted time the script executes: for feat in response['features']:
createDate = feat['attributes']['created_date']
createDate = int(str(createDate)[0:-3])
t = datetime.datetime.now() - timedelta(hours=hoursValue)
t = time.mktime(t.timetuple())
if createDate > t:
datesighted.append(str(feat['attributes']['datesighted']))
name.append(str(feat['attributes']['name']))
phone.append(str(feat['attributes']['phone']))
email.append(str(feat['attributes']['email']))
animaldoing.append(str(feat['attributes']['animaldoing']))
numanimal.append(str(feat['attributes']['numanimal']))
aggressive.append(str(feat['attributes']['aggressive']))
reaction.append(str(feat['attributes']['reaction']))
probtype.append(str(feat['attributes']['probtype']))
oidList.append(str(feat['attributes']['objectid']))
details.append(str(feat['attributes']['details']))
publicview .append(str(feat['attributes']['publicview']))
print(oidList)
mergelist = zip(probtype, details, publicview)
print(mergelist)
# Email Info
FROM = fromEmail
SUBJECT = 'New Wildlife Sighting Has been Reported'
Total= "Features with " + " " + str(publicview) + " " + " were added."
TotalAnimals = (Total.count("Yes"))
print(TotalAnimals)
#TEXT = "There were " + " " + str(TotalAnimals) + " " + " sighting(s) added the Cougar Map within the past hour."
#TEXT = '<a href="http://maps.google.com/maps?z=12&t=m&q=loc:'+str(p['latitude'])+'+'+str(p['longitude'])+'">Click Here</a>'
tom = datesighted[0]
chosen_number = int(tom)
s = chosen_number / 1000.0
print s
dFormat = "%Y-%m-%d %H:%M:%S.%f"
datesightedconvert = datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S')
# Create the body of the message (a plain-text and an HTML version).
TotalSighted = "There were " + " " + str(TotalAnimals) + " " + " reports(s) added the Wildlife Map within the past 5 min."
Sighted = "\nAnimal Sighted : " + str(probtype)
TheDateSighted = "\nDate Sighted : " + str(datesightedconvert) + " " + " ***\n"
reported = "\nReporter Name: " + str(name)
PhoneNumber = "\nReporter Phone Number: " + str(phone)
ReportedEmail = "\nReporter Phone Email: " + str(email)
Aggressiveness = "'\n'Was animal Aggressive?: " + str(aggressive)
ReportedReaction = "'\nWhat was the animal Reaction?: " + str(reaction)
ReportedDetails = "'\n'More Details about the sighting: " + str(details)
AnimalDoing = "'\n'What was the Animal(s) Doing?: " + str(animaldoing)
AnimalSeen = "'\n'How Many were seen?: " + str(numanimal)
Link = "'\n\n'View more information on the : \ \n\n\n ***if there are more than 1 reports then only the first Date Sighted will be in this Email.***"
Text = TotalSighted + TheDateSighted + Sighted + reported + PhoneNumber + ReportedEmail + Aggressiveness + ReportedReaction + ReportedDetails + AnimalDoing + AnimalSeen + Link
print ''.join(Text)
message = """\
From: %s
To: %s
Subject: %s
%s
""" % (FROM, ", ".join(TO), SUBJECT, Text)
# If new features exist, send email
if len(oidList) > 0:
smtpObj = smtplib.SMTP(host=smtpServer, port=portNumber)
smtpObj.sendmail(FROM, TO, message)
print("Successfully sent email")
smtpObj.quit()
... View more
05-07-2021
05:49 AM
|
0
|
0
|
16609
|
|
POST
|
I've run into this issue, and I believe it's something specific with ArcGIS Pro 2.7. I would recommend logging a case with support so they can log this. The workaround I found was stopping the service, updating the domain in ArcMap, and then restarting the service. The service then picked up the new domains.
... View more
05-06-2021
09:30 AM
|
1
|
3
|
15801
|
|
DOC
|
This document provides steps on how to track how long an event has visited a location (geofence). In the below example, a GeoTab Connector has been configured to track vehicle locations. A polygon well pad feature service has been imported as geofences. We’re interested in tracking how long a vehicle spends at each well pad. Configure Data 1. Create a table (i.e. Trip_Info) in a geodatabase with the following fields: JakeSkinner_0-1620293911893.png Field Name Alias Data Type Description OBJECTID OBJECTID Object ID vin VIN Text VIN number of the vehicle wellpad Well Pad Text Name of the well pad wellpad_starttime Well Pad Start Time Date Start Date/Time vehicle enters well pad wellpad_endtime Well Pad End Time Date End Date/Time vehicle exits well pad unique_id Unique ID Text Unique ID calculated by GeoEvent visited Visited Text Text field that will be updated to Yes when a vehicle enters and exits a geofence wellpad_totaltime Well Pad Total Time Double Field to calculate total time vehicle spends at well pad This table is published to an editable feature service called Trip_Info Configure GeoEvent 1. Previously configured for this example, the GeoTab Connector is writing real-time vehicle data to a feature service called Vehicles_Realtime JakeSkinner_1-1620293911896.png 2. The Well Pads have also been imported as Geofences. The Category name is Well Pad for all these geofences: JakeSkinner_2-1620293911905.png 3. Create a GeoEvent Definition by importing the schema from the Trip_Info service published previously. a. Set the vin field as the TRACK_ID JakeSkinner_3-1620293911915.png 4. Create a copy of this GeoEvent Definition with the name Trip_Info_Reduced_Enter and keep only the vin, wellpad, wellpad_starttime, and unique_id fields: JakeSkinner_4-1620293911923.png 5. Create another copy of the Trip_Info GeoEvent Definition with the name Trip_Info_Reduced_Exit and keep only the vin, wellpad, wellpad_endtime, and unique_id fields: JakeSkinner_5-1620293911930.png The Trip_Info_Reduced_Enter and Trip_Info_Reduced_Exit GeoEvent Definitions are used to update the wellpad_starttime and wellpad_endtime fields. The other fields are removed so that GeoEvent Services do not populate these fields will NULL/empty values. 6. Create an Update a Feature output that updates the Trip_Info service using the unique_id field as the Unique Feature Identifier Field: JakeSkinner_6-1620293911940.png Start the Trip Info Update Output service. 7. Create a new GeoEvent Service, i.e. Vehicle Enters Well Pad a. Add the geotab-in input b. Add the GeoTagger processor referencing the Geofences with the Spatial Operator Enter Any. The target field will be a New Field called GeoTags. Specify a new name for the GeoEvent Definition, i.e. Enter Well Pad GeoTagger. Choose No for the option Include Geofence Category in GeoTag JakeSkinner_7-1620293911948.png c. Connect the Input to the GeoTagger Processor d. Add the Trip Info Update Output created previously to the GeoEvent Service, but do not connect it to the GeoTagger Processor. Publish the GeoEvent Service and start it. Let it run until some events enter a geofence. This will create the new GeoEvent Definition created in the GeoTagger Processor. e. Add a Filter to remove events that have NULL values for the GeoTags field: JakeSkinner_8-1620293911951.png f. Add a Field Mapper Processor. The Source GeoEvent Definition will be the GeoEvent Definition created from the GeoTagger Processor. The Target GeoEvent Definition will be Trip_Info_Reduced_Enter. The GeoTags field created by the GeoTagger Processor contains the name of the well pad. This will be mapped to the wellpad field. The $RECEIVED_TIME will be mapped to the wellpad_starttime, and nothing will be mapped to unique_id. This will be calculated next: JakeSkinner_9-1620293911958.png g. Add a Field Calculator Processor. Calculate the unique_id by concatenating the vin and wellpad fields: JakeSkinner_10-1620293911963.png The unique_id is used in the case the vehicle visits multiple geofences. This field will allow all these visits to be recorded. The GeoEvent Service should appear as the following: JakeSkinner_11-1620293911966.png 8. Make a copy of the Vehicle Enters Well Pad GeoEvent Service a. Rename the GeoEvent Service to Vehicle Exits Well Pad b. Update the GeoTagger Process and change the Spatial Operator to Exit Any. Also, change the New GeoEvent Definition Name to Exit Well Pad GeoTagger JakeSkinner_12-1620293911974.png c. Disconnect the GeoTagger from the Filter, Publish, and start the GeoEvent Service so it creates the new GeoEvent Definition: JakeSkinner_13-1620293911977.png d. After the Exit Well Pad GeoTagger geoevent definition has been created, open the Field Mapper Processor. Change the Source GeoEvent Definition to Exit Well Pad GeoTagger and the Target GeoEvent Definition to Trip_Info_Reduced_Exit. GeoTags will be mapped to wellpad, $RECEIVED_TIME will be mapped to wellpad_endtime, and unique_id will be left blank: JakeSkinner_14-1620293911985.png e. Connect the GeoTagger Processor back to the Filter, Publish, and start the GeoEvent Service JakeSkinner_15-1620293911987.png 9. Make a copy of the Trip_Info GeoEvent Definition Specify the name as Trip_Info_OBJECTID Set the objectid field as the TRACK_ID JakeSkinner_16-1620293911994.png 10. Make a copy of the Trip_Info_OBJECTID GeoEvent Definition Specify the name as Trip_Info_OBJECTID_Reduced Delete all fields except objected, vin, unique_id, and visited JakeSkinner_17-1620293912001.png 11. Create a Poll an ArcGIS Server for Features input Name: Trip Info Input Check No for Create GeoEvent Definition Set the GeoEvent Definition Name (Existing) to Trip_Info_OBJECTID JakeSkinner_18-1620293912010.png This input will be used to see when a location has a start time and end time recorded 12. Create a copy of the Trip Info Update Output and rename it to Trip Info Update Visited Output. Set the Unique Feature Identifier Field to objectid: JakeSkinner_19-1620293912015.png Start the Trip Info Update Visited Output service. 13. Create a new GeoEvent Service called Trip Info Visited Add the Trip Info Input Add a Filter and set this to when the wellpad_endtime is not NULL JakeSkinner_20-1620293912017.png c. Add another Filter and set this to when the visited field is NULL JakeSkinner_21-1620293912019.png d. Add a Field Mapper Processor: Source GeoEvent Definition: Trip_Info_OBJECTID Target GeoEvent Definition: Trip_Info_OBJECTID_Reduced Map objected, vin, and unique_id fields JakeSkinner_22-1620293912024.png e. Add a Field Calculator Processor Expression: unique_id + ‘ - Visited’ Target Field: Existing Field Existing Field Name: unique_id JakeSkinner_23-1620293912029.png This Field Calculator will update the unique_id field so GeoEvent can accurately record if the same vehicle visits the same well pad multiple times. f. Add another Field Calculator Processor Expression: ‘Yes’ Target Field: Existing Field Existing Field Name: visited JakeSkinner_24-1620293912034.png This field will allow the GeoEvent Service to only update rows that have not been visited, instead of updating any row that has a wellpad_endtime. If you recall, we created a filter early to only process events that have a NULL value for the visited field. g. Add the Trip Info Updated Visited Output JakeSkinner_25-1620293912038.png Calculate Date Difference Here is an example of how the data will appear in the Trip Info feature service: JakeSkinner_26-1620293912050.png The wellpad_totaltime field can now be calculated to show the total time a vehicle has spent at a well pad. You can easily perform the calculation using ArcGIS Pro’s Field Calculator. 1. Select all records that contain Yes for the visited field JakeSkinner_27-1620293912054.png 2. Execute the Field Calculator on the wellpad_totaltime field: Expression Type: Arcade Expression: var startDate = Date($feature.wellpad_starttime);
var endDate = Date($feature.wellpad_endtime);
var totalTime = DateDiff(endDate, startDate, 'minutes');
return totalTime; JakeSkinner_28-1620293912062.png Result: pict.png
... View more
05-06-2021
04:53 AM
|
1
|
6
|
4899
|
|
DOC
|
@RickeyFighthow are you calling the field that contains didn't? Are you trying to include this in the e-mail that is sent? Feel free to post your code.
... View more
04-28-2021
03:38 AM
|
0
|
0
|
18420
|
|
POST
|
@AmandaBeck if you're looking to hide fields in your pop-up, take a look at the following document: https://community.esri.com/t5/arcgis-online-documents/hide-field-in-pop-up-using-arcade/ta-p/1029496
... View more
04-19-2021
01:22 AM
|
0
|
0
|
1955
|
|
POST
|
@AmandaBeck try the following: if (($feature.value> 0)) {
return "Active";
} value would be replaced with the field name. You can set "Active" to what ever you would like displayed in the legend.
... View more
04-08-2021
12:08 PM
|
1
|
2
|
1996
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 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 |
Online
|
| Date Last Visited |
Tuesday
|