POST
|
We are a water district in Ohio have about 7,000 water meters that we need to update the latitude and longitude. They were installed around 10 years ago and we used the GPS that we had available at the time. Obviously that doesn't compare to the accuracy that we have access to now and we would like to update the points. I want to retain all the information in each of the meters, except I want to update the location on the map, and the fields latitude and longitude that are being passed from the GNSS receiver. Using Collector's Update Point seems to be ideal way to make this happen, but I think it only updates the position on the map and does accept new/current lat and long from the receiver when updating the point. Does anyone know of a convenient way to do this? Is there something within the layer itself like "allow edits" or something where Collector would allow the receiver to write over the existing lat and long? Thank you, Travis
... View more
01-14-2021
05:54 AM
|
0
|
3
|
856
|
POST
|
I'm new to using Arcade expressions in my map pop-ups and l just finished a really useful one for myself with the help of Xander Bakker. But I now would like to "present" or show that information in a Dashboard. My longer term goal is to place useful information, like below, within dashboards and display that information to our employees. Below is the map I just completed. If I click on a "Zone" it displays the Meter Count, the water consumed by our customers in that Zone, the amount of Water pumped into the Zone and the amount of waterloss within that Zone in gallons and percent. Those are all being calculated by expressions in the pop-up. Is there an easy way to gather that same information in a Dashboard? If I could run the expressions once for every zone, and then save that info and display it on a bar chart or pie chart for % waterloss or something along those lines, it would be really beneficial. Can anyone suggest a good direction to purse on that? Thank you, Travis
... View more
10-27-2020
11:52 AM
|
0
|
1
|
862
|
POST
|
Xander, I believe I figured everything out. Below is what I basically used to get the 4 items in my popup to work. Although, there's probably a better way to do it. I repeat a lot of the same lines of code in each item that I list in the pop-up. It seems like I'm repeating the same thing 4 times, but I get the correct information and it's fairly quick. Thanks for your help Xander. Your examples were invaluable. Travis //grab meter information from layer "Service". var meters = FeatureSetByName($map,"Services"); //determine which are within the zone. var int = Intersects(meters, $feature); //Master meters have a "1" in the column/field "meter_definition". All other meters are null. //Use function Filter to isolate master meters within zone. var master = Filter(int, 'meter_definition >0'); //If more than 1 master meter exists in a Zone, the largest would be the intlet to that Zone. Other's would be outlets/master meters to other zones fed through this particular zone. var maximum = max(master, "consumption"); //Use varible master to sum consumption of masters meters within the zone. var MasterTotal = sum(master, "consumption"); //calculate total volume of consumption for ALL OTHER master meters in the Zone var MasterOut = MasterTotal - maximum; //calculate consumption of ALL meters contained in the Zone. var AllMeters = sum(int, "consumption"); //waterloss calculation = maximum - customer consumption - masterout custconsumption = AllMeters - maximum - MasterOut; var waterloss = maximum - custconsumption - MasterOut; Return waterloss;
... View more
10-27-2020
10:52 AM
|
1
|
1
|
980
|
POST
|
Thanks for the help Xander, I really appreciate it. I was working on this over the weekend, and was still getting an error after trying your suggestion in the above reply. It made no sense. I decided I would try another field in the attribute table to see what would occur I used the "reading" field which was the current reading of the meter. Worked perfectly. Changed it back to the "consumption" field and it would give me an error. Deleted everything, started a new map, reloaded the layers, same result. Just by chance I sorted the table I was uploading to AGOL and there it was: In our meter reading software when a meter rolls over (9,999,999 goes back to zero), it throws out this alert to let us know that it occurred and we need to adjust the reading. When I changed "RollOver" to a number it worked exactly as it should. Pretty frustrating. Can I ask one more question? I'm not sure of the best way to do this, but pertains to the waterloss calculation I need to make. It is simply what the customers consumed (consumption) subtracted from the master/zone meter. The customer meters are in each zone and I could include the master/zone meter within that zone, or leave it out. All the customer meters have the same zone name, but the master/zone meter is named different: customer meter zone name= Tank 6C master meter zone name = 6C Bolin Road If I leave the master/zone meter within the zone, it will be included in the sum of "consumption" and the total would not be correct. If I leave it out, the sum of "consumption" would be correct, but I would still need to subtract that total from the master/zone meter "consumption" to get waterloss. I'm not sure how to pull or use that "consumption" value of only the master meter. I thought FILTER may work by using the name, but I still don't know how I would pull the consumption value. I thought I might be able to use the MAX function to pull the value of the master/zone meter, but I think then I would have to include the master meter within the zone. I can't quite wrap my head around what to do to make it work. I then have the particular case where I have "Master Meter A" that feeds "Customer meters A", but also feeds Master Meter B, and customer meters B. In this case to get water loss I would be: Waterloss in Zone A = Master Meter A - Customer A - Master Meter B. Now I'm dealing with two different zones adding to the complexty. I'm sure there's a way to go about it though. Thanks Xander. Travis
... View more
10-26-2020
05:56 AM
|
0
|
3
|
8071
|
POST
|
Xander, I still receive the same Execution Error:Error. I pasted below what I'm executing, but it should be exactly what you outlined. I'm just pasting it in. If I go through the same process as before and comment lines out and Test the code as I go, it works until I get the Sum function. // access the meters featureset, limiting the fields to Consumption var meters = FeatureSetByName($map, "Services", ["Consumption"], False); // intersect the meters or services with the DMA var fs = Intersects(meters, $feature) // count the meters var CountMeters = Count(fs); // Calculate consumption var consumption = 0; var result = " "; // check to see if there are meters in the zone if (CountMeters > 0) { // calculate the sum of the consumption consumption = Sum(fs, "Consumption"); result = consumption + " gallon (" + CountMeters + " meters in zone)"; } else { result = "0 gallons (no meters in zone)"; } // return the result return result; If I simply wanted to Sum the Consumption Field for the layer Services, would it be this: var meters = FeatureSetByName($map, "Services", ["Consumption"], False); (no error) var usage = 0; (no error) var usage = Sum(meters, "Consumption"); ("Execution Error: Error" when uncommented) Return usage; It seems like there's something about that Sum function that it does not like. The actual field name is "consumption", lower case, but are things case sensitive? Or do double quotes mean something different than single quotes, or bracket, etc? Sorry for another reply. I know this is really close to working. Thanks for your help. Travis
... View more
10-23-2020
07:52 AM
|
0
|
6
|
8071
|
POST
|
Xander, I tried to insert the lines of code into Arcade, but I receive an Execution Error:Error. I pasted the code below. The only difference is I deleted my original layer called Meters so I could start clean and replaced it with Services. The entire table/fields are exactly the same with the field Consumption containing the values that I want to total. I test each line as I go and to see it they return values. For example, I commented out all the lines and just ran the line starting with var meters = FeatureSetByName($map, "Services", ["Consumption"], False) and added return meters. Pasted below is a snippet of the results, so I know it's working. When I uncomment the if statement is when I get the error. I guess I'm not following how the code knows which meters are contained in the feature to use in the Sum calculation. I understand that Count(...) counts the objects contained in the intersection, but I'm not sure how those particular meters are then passed to the function Sum to only calculate the consumption of meters contained within Interesection. It seems that Count only returns the number of Objects contained in the intersection. If I Return CountMeters I just get a single integer. If I go through the if statement, and CountMeters = 10, which is greater than 0, which seems to be a check to insure there are meters, but seems like it would Sum the consumption field for all meters, not the ones contained in the Intersection. Would that be correct? // access the meters featureset, limiting the fields to Consumption var meters = FeatureSetByName($map, "Services", ["Consumption"], False); // count the meters var CountMeters = Count(Intersects(meters, $feature)); // Calculate consumption var consumption = 0; // check to see if there are meters in the zone if (CountMeters > 0) { // calculate the sum of the consumption consumption = Sum(meters , "Consumption"); } // return the result Return consumption; Using Test, I tried to compile these lines code to see what would happen: var meters = FeatureSetByName($map, "Services", ["Consumption"], False); consumption = Sum(meters , "Consumption"); Return consumption The following also gives me that same error Execution Error:Error. consumption = Sum(meters , "Consumption"); So I think it has more to do with the Sum function then the if statement. Any ideas?
... View more
10-23-2020
06:36 AM
|
0
|
1
|
8071
|
POST
|
Xander, I was hoping you would reply. You really seem to know this well. I'll go through you're example and see if I can mirror that into my map. The ["Consumption"] was the piece I was missing in your following line of code. var meters = FeatureSetByName($map, "METERS", ["Consumption"], False); One quick question; what does the False do at the end of that above line? Thanks again Xander. Travis
... View more
10-22-2020
12:36 PM
|
0
|
1
|
8071
|
POST
|
This is related to water consumption and waterloss to add context. I have the following two layers in my map: -Zones -Meters I've been trying to make this work in Arcade, but can't exactly figure out how. I have figured out how to Count the meters contained in the "zone" as shown below in the map with the pop-up, but I also want to display the total of the field "Consumption" of all the meters contained in that polygon/zone. So if I had a Zone and there were 5 meters in the zone, and each customer consumed 1,000 gallons, I want to display 5,000 gallons on the pop-up for that Zone. var meter = FeatureSetByName($map,"METERS") var CountMeters = Count(Intersects(meter, $feature)) Return CountMeters I'm focused on using the "(Intersects(meter, $feature))" with the function of SUM, but I'm not sure that's the right direction. In words, I want to find all the features from the Meter layer that are contained in the polygon Zone, and then total the attribute field "consumption" of those objects. I'm looking for the total water consumption within that Zone. I can only find examples of counting objects using the Intersect function, but not totaling fields using the Intersect function. Any help would be greatly appreciated. Attibute table for a Meter: DMA Zone and Meters:
... View more
10-22-2020
08:54 AM
|
1
|
12
|
9195
|
POST
|
Joe, Quick question. I was reviewing that link you posted (Create Custom Field Calculations Using Arcade Expressions ) and was experimenting in my layers. Is it possible to create a field in Layer A, and populate that field using "Calculate" and Arcade to write an expression that pulls data from a field in Layer B? Thanks again, Travis
... View more
10-21-2020
06:54 AM
|
0
|
1
|
2835
|
POST
|
Thanks for the input Joe, I really appreciate it. I've been trying to get this done for a while now, and as new tools and functionality evolve with AGOL, the closer I get. I'm sure someone way more savvy then myself could easily have done this years ago, but I want to try learn more about it and see where it goes. I don't have a lot of time to devote towards it at work, but I think AGOL is pretty amazing at what it can do. Yes, I was assigning that value manually. It was just an easy way for me to add all the values contained within a polygon region and have if give me the answer I wanted using the Aggregate tool. I have never dabbled with "expressions", but I think this is where I'm heading. I think you are right, Arcade might be where I need to go to make this work. I've been reading and messing around with it today trying to figure out how to make things work. I have one layer called "Consumption" that contains all 7000 meters for our district including the master/zone meters. The actual field that groups them is "Tank_Area" and is the zone where each meter resides (actual attribute table is below). The master meter also has a unique name in the same Tank_Area field. I guess I'm looking to develop an expression that says within this layer called "Consumption", total the values in the field name "consumption" for all the meters that have the name "Tank 6C" and subtract that from the master meter called "Tank 6C Master". I'm not sure how to put that into an expression. Does that make sense? I then have to do that somehow for 15 zones or so. I went into my Consumption layer and I see where to add an expression to the pop-up, but I'm not sure what to type in there, and after I type it in there, where does the returned value go. I have some learning to do! (I tried pasting in an image but it peeled it out. I attached it below. Hopefully that worked. I don't know if my original post had the images stay or not. I suspect not which makes it hard to follow. I'll attach my other image to this one as well. The Zone.jpg is the attribute screen shot referenced in the last post)
... View more
10-20-2020
12:04 PM
|
0
|
0
|
2835
|
POST
|
Martin, I appreciate the reply. I'm very familiar with the items that you outlined above. My question is more about using the tools in "Analysis" to achieve my goal. In my case, water loss is not an unknown; I know what went through the master meter, and what we sold through each customer's meter within the zone. I'm looking for an easy way to leverage AGOL to display water loss as a percentage in each zone. To achieve that, I need to make the calculation I described above. I'm trying to make this process as simple as possible so people within my office can simply "update" the "consumption" layer using a .csv file and then run the analysis. That map or information, generally shown as a percentage, would be displayed on digital sign (large LCD TV) within our office to bring attention to areas with high levels of loss. Travis
... View more
10-19-2020
02:03 PM
|
0
|
0
|
2835
|
POST
|
I'm am trying to set up a map in AGOL with DMA (zones) so I can calculate the water loss in these areas and display it. Our basic setup is we have each of our meters GPS'd and that info is updated monthly to AGOL to reflect the new consumption in the attribute table. Our meters are symbolized with different colors to show which zone that particular meter resides in. Master/Zone meters are also color-coded to easily distinguish them from customer meters. I have also created a layer so I could draw polygons that represent each of the zones where we have our meters. I then use "Analysis" to run the aggregate tool, which totals the "consumption" field in the attribute table for each meter for each zone. It works great if you are only looking at zones that are independent of one another. But there are cases where we have one zone down stream from another. Therefore you have two master/zone meters to contend with in the summation of the "Consumption" field. The following pic is kind of tough to see, but illustrates my issue. I have Zone 1 in magenta and Zone 2 in green. The master/zone meters are the meters with the yellow crosses where I denoted Meter 1 and Meter 2. If I wanted to calculate the water loss in Zone 2, that's fairly simple visually. Total the consumption of all the meters in Zone 2, subtract that from the Master/Zone Meter 2 and I have my loss. To use the aggregate tool I assigned the master/zone meter a negative value. That worked great if the zones are not connected in anyway. But now I'm trying to determine the water loss in Zone 1 (magenta), and I have the issue of two master/zone meters. The negative in the aggregate calculation will no longer work. I somehow have to subtract out Meter 2's consumption from Meter 1. I initially included Meter 2 in Meter 1's zone, but again, the negative now hurts me instead of helps. Does anyone have a suggestion or idea on how I can accomplish that? Appreciate in help/advice. Travis
... View more
10-19-2020
11:31 AM
|
0
|
6
|
2902
|
POST
|
If I have a hosted feature layer, in my case it's a waterline layer that is shared to our field staff; how can I completely replace that layer easily without messing up our online maps? I don't want to add to it, I just want to replace or write over it. As an example, we may spot dig and locate a waterline in a particular area and we will acquire a GPS point on the waterline using our "Locate" layer. I will then pull that "locate" layer into ArcGIS Desktop and make alignment changes to make the waterline more accurate. We have really nice hi-res county aerials which is why I do it on Desktop. I don't have to do this often, but I have made many small changes in quite a few places and need to update the waterline layer contained in our online maps on AGOL. I just want to write over the layer, but change nothing else with regard to sharing, editing, etc., and not lose or create errors in the existing maps. I created a new zip file that contains the watermain shape files (exported from Desktop) and uploaded that layer to a feature layer on AGOL. I haven't done anything with it at this point. If I click on that feature layer and click on the "Update Date" button, there are two options: "Overwrite Entire Layer" or "Append Data to Layer". Overwrite sounds like the correct choice, but that is not listed as an option in my existing watermain layer that I want to replace. Only the Append option is listed. I'm not sure why that is, but my existing layer is a couple years old. I also may have one iPad in the field that has an offline map on it. I'll check that later today and delete it. I don't know if that would have anything to do with it or not. I appreciate the help. Travis A.
... View more
08-25-2020
09:16 AM
|
0
|
0
|
740
|
POST
|
Rachel, This is similar to Ben's question above. If I have a hosted feature layer, in my case it's a waterline layer that is shared to our field staff; how can I completely replace that layer easily without messing up our online maps? I tried Append, and I believe I just duplicated the features in the layer like Ben stated. As an example, we may spot dig and locate a waterline in a particular area and we will acquire a GPS point on the waterline using our "Locate" layer. I will then pull that "locate" layer into ArcGIS Desktop and make alignment changes to make the waterline more accurate. We have really nice hi-res county aerials which is why I do it on Desktop. I don't have to do this often, but I have made many small changes in quite a few places and need to update the waterline layer contained in our online maps on AGOL. I just want to write over the layer, but change nothing else with regard to sharing, editing, etc., and not lose or create errors in the existing maps. I created a new zip file that contains the watermain shape files (exported from Desktop) and uploaded that layer to a feature layer on AGOL. I haven't done anything with it at this point. If I click on that feature layer and click on the "Update Date" button, there are two options: "Overwrite Entire Layer" or "Append Data to Layer". Overwrite sounds like the correct choice, but that is not listed as an option in my existing watermain layer that I want to replace. Only the Append option is listed. I'm not sure why that is, but my existing layer is a couple years old. I also may have one iPad in the field that has an offline map on it. I'll check that later today and delete it. I don't know if that would have anything to do with it or not. I appreciate your help. Travis Anderson
... View more
08-25-2020
08:59 AM
|
0
|
0
|
1983
|
POST
|
Michelle, This is a little late, but the first app that I ever found and used on a smart phone that allowed you to load shape files locally to the device was iGIS. It didn’t need cell coverage to work. That was around 9 years ago. We still use it today since we regularly go in and out of cell/data coverage. We only have 10 people using it and generally it’s used to locate an asset, such as a hydrant. I believe it has much more functionality than what we utilize. It is nice to have a backup app that stores layers locally. There have been many times when I was driving our rural Ohio roads with no coverage and not 100% sure where I was. I can open iGIS and use the devices GPS to get me back to civilization. I guess it would be similar to using Collector Offline permanently. Travis
... View more
03-14-2020
07:48 PM
|
0
|
0
|
1073
|
Title | Kudos | Posted |
---|---|---|
1 | 10-22-2020 08:54 AM | |
1 | 12-12-2017 06:56 PM | |
1 | 02-11-2016 12:48 PM | |
1 | 10-07-2015 09:00 AM | |
1 | 02-04-2016 07:20 AM |
Online Status |
Offline
|
Date Last Visited |
01-14-2021
07:29 AM
|