|
POST
|
Hi ANDREW BUTTERFIELD , Using the link I can see the public group, but it does not appear to have any content and the only member is you. If it is not a problem to have your data shared publicly you can share it in this group, if not, make sure you have the option to look outside your organization switched on, since otherwise you will not be able to find me ("xbakker.spx").
... View more
10-07-2020
08:21 AM
|
0
|
1
|
1142
|
|
POST
|
Hi ButterfieldLECP , I just searched for "GIS Edits" and checked the groups with owners outside mi organization and the group does not appear in the list. Can you invite me using "xbakker.spx"? If you use my email or name it may be linked to one of the many other organizations that I am part of. Sorry for that.
... View more
10-07-2020
07:46 AM
|
0
|
3
|
3752
|
|
POST
|
Hi ButterfieldLECP , I did not receive a notification. I can see if I have the group listed if you can tell me what it is called.
... View more
10-07-2020
07:21 AM
|
0
|
5
|
3752
|
|
POST
|
Hi ANDREW BUTTERFIELD , Let me know what the data is shared. Summing the participants should not be a problem.
... View more
10-07-2020
06:41 AM
|
0
|
7
|
3752
|
|
BLOG
|
Hi Pauline Low Pui Ling , I just opened a web map that use Arcade to classify the age of hydrants and the expression works. In the pop-up I use FeatureSetBy* to retrieve the maintenance history and that part does not work. Can you share the Arcade expression you are using?
... View more
10-07-2020
06:39 AM
|
0
|
0
|
18842
|
|
POST
|
Hi ButterfieldLECP , I assume that a little more will be required to get the desired result. If you can share the web map and data again ("xbakker.spx") I can have a closer look. What information of the organizations do you want to show at each venue?
... View more
10-06-2020
02:34 PM
|
0
|
9
|
3752
|
|
POST
|
Hi C McDonald , I have had problems with the example I mounted for the article you mentioned. It seems that a couple of updates ago, it has become more strict with what is filtered out of the expression. I can successfully test the code in the Arcade expression editor and it will show a valid mailto link, but when I do it in the web map, it seems to filter everything out and returns an empty string. I have tested with keeping the mailto outside the expression and include it in the custom HTML, but it is stripped anyway. If I look at the traffic and errors I see is is launching an "external handler" for the mailto link which seems to be generated correctly, but the external handler probably is stripping the result fro some reason.
... View more
10-06-2020
01:11 PM
|
1
|
1
|
1971
|
|
POST
|
Hi Arwen Vaughan , Not sure why you are getting an empty Error message field. I just checked locally and the field is filled in my case: Maybe it is best to contact support and see what is happening. Just to add some additional info; I am running ArcGIS Pro 2.6.2 and my version 4 UN is stored in a local FGDB.
... View more
10-06-2020
11:58 AM
|
2
|
1
|
8506
|
|
POST
|
Hi Rickey Fite , The FeatureSetBy* functions and the Filter functions were introduced at Enterprise version 10.7 in Arcade version 1.5 (see: Version Matrix | ArcGIS for Developers ). Unfortunately, with Enterprise 10.6.1 you have no possibility to do this.
... View more
10-06-2020
07:10 AM
|
2
|
3
|
9427
|
|
POST
|
Hi Arwen Vaughan , Let me simplify the "Error(s)" expression to explain what happens (see expression below). It will loop j from 0 to 63 and do a calculation to see what errors are represented by the code "17213423616". The "errors" variable is an array of error descriptions extracted from the static messages array (excluded from the code below). At the end it will use the Concatenate function to concatenate all the elements (error codes and descriptions) from the errors array and separate them with a new line making each error to appear on its own line: var code = 17213423616;
var errors = [];
var bitMask = 1;
var i = 0;
for (var j = 0; j < 64; j++) {
Console("code:" + code);
if ((code & bitMask) > 0) {
Console(" - i:" + i + " j:" + j);
// errors[i++] = static_messages ;
errors[i++] = j;
Console(" - errors:" + errors);
}
code /= 2;
if (code < 1) {
break;
}
}
return Concatenate(errors, TextFormatting.NewLine); When you run the code above in the Arcade playground (ArcGIS Arcade | ArcGIS for Developers ) if will return this: each of the two error codes [no descriptions in this case] will appear on a new line: The console ("Messages" tab) will show this: code:17213423616
code:8606711808
code:4303355904
code:2151677952
code:1075838976
code:537919488
code:268959744
code:134479872
code:67239936
code:33619968
code:16809984
code:8404992
code:4202496
code:2101248
code:1050624
code:525312
code:262656
code:131328
code:65664
code:32832
code:16416
code:8208
code:4104
code:2052
code:1026
code:513
- i:0 j:25
- errors:[25]
code:256.5
code:128.25
code:64.125
code:32.0625
code:16.03125
code:8.015625
code:4.0078125
code:2.00390625
code:1.001953125
- i:1 j:34
- errors:[25,34]
... View more
10-05-2020
02:31 PM
|
1
|
4
|
8506
|
|
POST
|
Hi Arwen Vaughan , When the code changed from 8 to 9 it actually means that it is a combination of 8+1 (=9). In this case 1 represents "Inserted/Updated feature" (a dirty feature before validating). The "Error(s)" and "Status Description" are Arcade expressions: The expression is executed on the fly and when you click a feature it will show the result in the pop-up. The attribute table does not reflect this performance reasons, since it would need to execute it for all records. The best way to evaluate a situation is identify the error feature and check the pop-up (see an example below): The arcade expressions that are used, are: Error(s): var code = $feature.ErrorCode;
if (code == 0) return;
var unknown = 'See the online help for this error';
var static_messages = ["0: The field has invalid data type.",
"1: The geometry field is null or the geometry is empty.",
"2: Getting subtype value fails or the subtype value is unknown.",
"3: Getting subtype discriminator value fails or the subtype discriminator value is unknown.",
"4: Line feature has fewer than two vertices.",
"5: Line feature has length within tolerance.",
"6: Geometry error could not locate the vertex along the line feature.",
"7: Standalone point feature.",
"8: Invalid connectivity - No junction edge rule.",
"9: Invalid connectivity - More than one junction edge rule applicable.",
"10: Invalid connectivity - The edges are different subtypes and cannot connect.",
"11: An end of an edge has a missing junction.",
"12: " + unknown,
"13: Midspan connectivity not allowed.",
"14: " + unknown,
"15: " + unknown,
"16: " + unknown,
"17: No containment rule.",
"18: No structural attachment rule.",
"19: Multipart line encountered.",
"20: Self-intersecting line.",
"21: Duplicate vertices.",
"22: " + unknown,
"23: The subtype or the discriminator are out of range or the combination is invalid.",
"24: Invalid line feature was discovered during updating subnetwork.",
"25: Stacked point features.",
"26: Invalid device feature was discovered during updating subnetwork.",
"27: Invalid parent subnetwork discovered during update subnetwork.",
"28: Disjoint subnetwork discovered during update subnetwork.",
"29: Inconsistent subnetwork name on multiple subnetwork controllers in the same subnetwork discovered during update subnetwork",
"30: Inconsistent subnetwork name on multiple parent subnetwork controllers in the same subnetwork discovered during update subnetwork.",
"31: Association record is referencing an invalid from or two globalid.",
"32: Error setting weight values.",
"33: Inconsistent asset group or asset type of subnetwork controller discovered during update subnetwork",
"34: Feature or object in unsupported containment relationship",
"35: Feature or object in unsupported structural attachment relationship",
"36: Line feature has invalid terminal",
"37: A feature with the Subnetwork Tap category was found midspan to multiple lines.",
"38: Devices with multiple terminals cannot be midspan.",
"39: Point feature has invalid terminal configuration",
"40: Invalid junction feature was discovered during updating subnetwork.",
"41: Invalid junction object was discovered during updating subnetwork.",
"42: Invalid edge object was discovered during updating subnetwork.",
"43: " + unknown,
"44: " + unknown,
"45: " + unknown,
"46: " + unknown,
"47: " + unknown,
"48: " + unknown,
"49: " + unknown,
"50: " + unknown,
"51: " + unknown,
"52: " + unknown,
"53: " + unknown,
"54: " + unknown,
"55: " + unknown,
"56: " + unknown,
"57: " + unknown,
"58: " + unknown,
"59: " + unknown,
"60: " + unknown,
"61: " + unknown,
"62: " + unknown,
"63: " + unknown];
var errors = [];
var bitMask = 1;
var i = 0;
for (var j = 0; j < 64; j++) {
if ((code & bitMask) > 0) {
errors[i++] = static_messages[j];
}
code /= 2;
if (code < 1) {
break;
}
}
return Concatenate(errors, TextFormatting.NewLine);
Status Description: var status = $feature.Status;
if (status == 0) {
return "0: Disabled";
}
var static_messages = ["1: Inserted/Updated feature",
"2: Deleted feature",
"4: Modified objects",
"8: Feature error",
"16: Object error",
"32: Subnetwork Error"];
var statuses = [];
var mask = 1;
var i = 0;
for (var j = 0; j < 6; j++) {
if (mask > status) {
break;
}
if ((status & mask) > 0) {
statuses[i++] = static_messages[j];
}
mask *= 2;
}
return Concatenate(statuses, TextFormatting.NewLine);
... View more
10-05-2020
01:07 PM
|
1
|
6
|
8506
|
|
POST
|
Hola Geo Mapps , Por lo que veo, si el uso de ArcGIS Maps for SharePoint no es una opción válida para usted (Add data from SharePoint—ArcGIS Maps for SharePoint | ArcGIS ), se puede usar la extensión Data Interoperability para agregar listas de SharePoint a ArcGIS Pro: Supported formats with the Data Interoperability extension—ArcGIS Pro | Documentation
... View more
10-05-2020
06:04 AM
|
1
|
1
|
2203
|
|
POST
|
Hi Ari Lukas , Glad to hear that! Do you need any additional explanation for the Arcade expression or did my answer resolve your question? If so, can you mark the answer as the correct answer?
... View more
10-02-2020
06:30 AM
|
0
|
0
|
3480
|
|
POST
|
Hi Ari Lukas , The math is not too complex to be handled by Arcade. See example below: // read values from feature
//var P = $feature["Pitot_Pressure"];
//var S = $feature["Static_Pressure"];
//var R = $feature["Residual_Pressure"];
// example values
var P = 40;
var S = 108;
var R = 55;
// apply math to calculate amount of water flow
var Q = 167.0625 * Sqrt(P);
Console("Q:" + Q);
// rated flow at 20 psi
var RF = Q * Pow(((S - 20) / (S - R)), 0.54);
Console("RF:" + RF); The values returned are: Q:1056.5960232037598
RF:1389.3787273337343 In your formula for the rated flow you were missing some brackets before applying the division. Since the results are not the same as the values you provided, I did the same in Excel and it seems that your result is off for Q by 0.4. I wonder why...?
... View more
09-30-2020
12:35 PM
|
1
|
2
|
3480
|
|
POST
|
Hi shorndrack01 , You are right, there is an additional value at the end of the line (I assume that this is the total for the year). You can add an additional line (see line 44) that will strip that value from the list and then it seems to work again: def main():
import arcpy
import os
sr = arcpy.SpatialReference(4326)
arcpy.env.overwriteOutput = True
# input
years = [2013, 2014, 2015, 2016]
for year in years:
print('year:{}'.format(year))
precip = r'D:\GeoNet\Precip\precip.{0}'.format(year)
# create output fc
print("create output fc...")
fc = r'D:\GeoNet\Precip\test.gdb\precip_{0}'.format(year)
ws, fc_name = os.path.split(fc)
arcpy.CreateFeatureclass_management(ws, fc_name, 'POINT', None, None, None, sr)
print("add fields...")
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August',
'September', 'October', 'November', 'December', 'Total', 'Mean', 'Min', 'Max']
for month in months:
arcpy.AddField_management(fc, month, 'DOUBLE')
# insert cursor
print("read file and add features...")
cnt = 0
flds = ['SHAPE@']
flds.extend(months)
with arcpy.da.InsertCursor(fc, flds) as curs:
with open(precip, 'r') as f:
report = True
for line in f.readlines():
try:
cnt += 1
if cnt % 10000 == 0:
print(" - processing point {}".format(cnt))
while ' ' in line:
line = line.replace(' ', ' ')
line = line.strip()
lst = line.split(' ')
lst = [float(a) for a in lst]
lst = lst[:-1] # ignore last data on row
pntg = arcpy.PointGeometry(arcpy.Point(lst[0], lst[1]), sr)
lst_row = [pntg]
data = lst[2:]
stats = [sum(data), sum(data) / 12.0, min(data), max(data)]
lst_row.extend(data)
lst_row.extend(stats)
row = tuple(lst_row)
curs.insertRow(row)
except Exception as e:
if report == True:
print(line)
print("{} {}".format(cnt, e))
report = False
if __name__ == '__main__':
main()
... View more
09-30-2020
08:57 AM
|
1
|
2
|
2704
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|