|
POST
|
I know it works with Map Viewer Classic, but it should also work with the new Map Viewer.
... View more
11-19-2022
10:18 AM
|
0
|
0
|
2738
|
|
POST
|
You're comparing firsteventhistorySorted and firstplowhistorySorted. These are features from different feature sets, so they will probably never be the same. Instead, you watn to compare the eventstart attribute of both features: var go = IIF(firsteventhistorySorted.eventstart == firstplowhistorySorted.eventstart, popupString, "") If there is no guarantee that eventstart will be exactly the same in both feature sets, you will probably want to format these date values before comparing: var date1 = Text(firsteventhistorySorted.eventstart, "Y-MM-DD HH:mm")
var date2 = Text(firstplowhistorySorted.eventstart, "Y-MM-DD HH:mm")
var go = IIF(date1 == date2, popupString, "")
... View more
11-18-2022
07:23 AM
|
0
|
1
|
1058
|
|
POST
|
Moin Jessica, ein Screenshot wäre hilfreich. Allgemein: Eine Geodatabase wird im Dateiexplorer deines Betriebssystems zwar als Ordner mit der Endung .gdb angezeigt und du kannst diesen Ordner auch öffnen. Da sind allerdings nur kryptisch benannte Dateien drin, mit denen du nichts anfangen kannst. Erst in ArcGIS Pro kann die GDB als solche erkannt und geöffnet werden. Wenn du in diesem Ordner Shapefiles und Layer hast, ist irgendwas schiefgelaufen. In dem Fall würde ich die Layer und Shapefiles (mitsamt allen dazugehörigen Dateien: .cpg, .dbf, .prj, .sbn, .sbx, .shp, .shp.xml, .shx) in einen anderen Ordner verschieben. Zum Öffnen in ArcGIS Pro hast du mehrere Möglichkeiten: Dateien mit den Endungen .lyr, .lyrx, .dbf und .shp kannst du einfach per Drag-&-Drop aus deinem Datei-Explorer in das Pro-Fenster ziehen. Mit Rechtsklick auf die Karte im Inhaltsverzeichnis oder über den "Add Data"-Button kannst du Daten hinzufügen: In dem Auswahlfenster werden Geodatenbanken (Ordner mit .gdb Endung) als solche erkannt und können wie normale Ordner geöffnet werden. Für Shapefiles wird hier nur die .shp-Datei angezeigt. Du kannst hier eine oder mehrere Dateien auswählen und mit Klick auf OK in die aktive Karte laden. Alternativ kannst du auch die Katalog-Ansicht oder das Katalog-Fenster benutzen. Auch hier kannst du zu deinen Layern / Shapefiles / Featureklassen navigieren und sie mit Drag-&-Drop oder per Rechtsklick in die Karte laden.
... View more
11-18-2022
06:40 AM
|
0
|
0
|
2189
|
|
POST
|
You can't say "use this feature for testing". You only can edit the field values it uses for testing. Let's look at an example: Just return the count of features in a related table. With the default $feature: If I change the value of the field that is used for the relationship (it was 724): Think about it this way: When you start the expression editor, it loads the values of the first feature and uses them to test and validate the expression (at least that's what I think it does). At this point, it doesn't have an actual connection to the feature anymore, it just uses the values. So to test the expression on different features, you can't change the feature it uses, you can only change the values.
... View more
11-17-2022
05:33 AM
|
1
|
0
|
4236
|
|
POST
|
You can edit the values used for testing with the pecil symbols right of the field names.
... View more
11-17-2022
03:59 AM
|
0
|
0
|
4289
|
|
POST
|
You can calculate Group_Date and SEQID in the same rule: // Calculation Attribute Rule
// triggers: Insert
// Field: empty
// Calculate Group_Date
var group_date = $feature.Group_Number + "_" + Text($feature.CREATEDATE, "Y-MM-DD")
// Find all existing features with the same Group_Date
var features_with_same_group_date = Filter($featureset, "Group_Date = @group_date")
// Calculate SEQID
var next_id = Count(features_with_same_group_date) + 1
var seq_id = group_date + "_" + next_id
// Return Group_Date and SEQID
return {
"result": {"attributes": {
"Group_Date": group_date, "SEQID": seq_id
}}
} No idea if this will work offline...
... View more
11-16-2022
11:15 PM
|
1
|
1
|
2050
|
|
POST
|
I haven't worked with Attribute Assistant in years, but there is the Generate ID By Intersect function. If you don't need to work with the feature class in ArcMap, this task can also be easily achieved with an Attribute Rule.
... View more
11-16-2022
12:36 AM
|
0
|
0
|
1690
|
|
POST
|
Does it work if you specify a coding that works with umlauts? # -*- coding: cp1252 -*-
import arcpy
# ÄäÖöÜüß
arcpy.AddMessage("ÄäÖöÜüß")
... View more
11-15-2022
07:25 AM
|
0
|
1
|
1386
|
|
POST
|
SQL uses logical operators. The operator AND means "Both values have to be true". So in your query, you search for features where makemodel is both Ford and Toro. This is impossible, so the query layer will be empty. You should use the logical OR, which means "At least one of these has to be true". Also, not sure if this applies to querying feature services, but in "normal" SQL, % is a placeholder/wildcard for seaching text with the operator LIKE. makemodel LIKE '%Ford%' will find features with "Ford Fiesta", "Ford GT", and "Ford Mustang". makemodel = '%Ford%' should only find rows with the actual field value %Ford%.
... View more
11-15-2022
06:51 AM
|
2
|
3
|
2940
|
|
POST
|
In that case, you would leave the field parameter empty and return a dictionary instead of a value. var habitats = FeaturesetByName($datastore, "Habitat_Polygons")
var habitat = First(Intersects(habitats, $feature))
if(habitat == null) { return null }
return {
"result": { "attributes": {
"Field1": habitat.Field1,
"Field2": habitat.Field2
}}
}
... View more
11-10-2022
03:37 AM
|
0
|
1
|
2916
|
|
POST
|
// load the habitat polygons
var habitats = FeaturesetByName($datastore, "Habitat_Polygons")
// get the first intersecting habitat
var habitat = First(Intersects(habitats, $feature))
// no intersecting habitat? -> abort
if(habitat == null) { return null }
// else return the habitat's site name
return habitat.SiteName
... View more
11-09-2022
10:41 PM
|
0
|
3
|
2925
|
|
POST
|
Store the count in a variable. If you encounter your break condition, change that variable to 0 before breaking out of the for loop. for row in cursor:
cenPnt = row[1]
arcpy.management.SelectLayerByLocation(ssLyr, 'INTERSECT', cenPnt)
ssLyrCount = int(arcpy.GetCount_management(ssLyr).getOutput(0))
while ssLyrCount > 0:
with arcpy.da.SearchCursor(ssLyr, fieldName2) as cursor1:
for row1 in cursor1:
biorID = row1[2]
neigbID = row1[3]
if neigbID == 9999:
print("\nError - Exit loop")
ssLyrCount = 0
break I don't know the rest of your script, but the snippet you posted will result in an infinite while loop if you select at least 1 feature and have no features with neigbID=9999 in the selection. Any reason to use while over if?
... View more
11-09-2022
01:32 AM
|
1
|
0
|
3332
|
|
IDEA
|
I'm all for new functionality in Arcade, but I'm not too sure about your use case. Yes, you can calculate a unique ID from Centroid() or a theoretical LabelPoint() (using the coordinates, I assume?) but the standard ways to do this are: Use a database sequence Create a database sequence and use an Attribute Rule like this on an integer field: // Attribute Rule on KeyField
// Triggers: Insert, Update
if(IsEmpty($feature.KeyField)) {
return NextSequenceValue("SequenceName")
}
return $feature.KeyField Or you can use it on a text field and combine the NextSequenceValue() with some string parts. Use a Globally Unique ID You can also create a GUID field in your table and use an expression like this: // Attribute Rule on KeyField
// Triggers: Insert, Update
if(IsEmpty($feature.KeyField)) {
return Guid()
}
return $feature.KeyField Assuming you use the coordinates of the polygon's centroid to calculate the ID, be aware that that value is not unique. If you copy a feature, the copy will have the same ID as the original!
... View more
11-08-2022
10:18 PM
|
0
|
0
|
2868
|
|
POST
|
Both of these are the same layer. You symbolized the layer with Unique Values of the field SubType. Go to the symbology of the layer and remove the "Combined" entry from the symbol list.
... View more
11-08-2022
08:26 AM
|
0
|
1
|
2315
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-30-2023 09:57 AM | |
| 1 | 05-18-2023 12:51 AM | |
| 1 | 03-05-2023 12:46 PM | |
| 1 | 12-07-2022 07:01 AM | |
| 1 | 06-21-2022 08:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-03-2024
06:14 PM
|