POST
|
Mark, As the collection is being done in Forest Service Wilderness areas, offline mode was a necessity. Under the map settings I have offline mode enabled and have defined 12 offline areas. Below is a screenshot of my specific maps settings. I want to make sure I'm answering your question correctly as this is the only way I thought you could use a map offline. Another difference I can think of is that the data I'm accessing (the point feature layer) is the output feature layer for my Survey. Not sure if that makes sense, so my survey R8 Wilderness Campsite Survey outputs data to the feature layer (hosted) R8 Wilderness Campsite Survey. This layer is in the Online Map titled AT/Wilderness Campsite Inventory that is set to Offline Mode Enabled for Collector. I have then created a view layer of R8 Wilderness Campsite Survey that filters the data so that only select sites are displayed. This view layer of the survey layer is the specific feature layer (sorry for saying layer so much there), that I am using the custom expression with and that this effect occurred. Finally, I formatted all of our old campsite data to match the format of the R8 Wilderness Campsite Survey feature layer and uploaded it into the layer using Update Data > Append Data to Layer. These are all the things I've done that I can think of that might impact my map behaving differently to what is normally expected. If any of that blathering doesn't make sense or further info would be helpful, please let me know! Again, thank you for the help!
... View more
04-12-2019
10:19 AM
|
0
|
1
|
10230
|
POST
|
So I have got it working now! Long story short in online mode the code text(centroid($feature).x); outputs -9331888.963170711 This then needs to be converted to longitude to be sent to Survey123. In offline mode though, the exact same code text(centroid($feature).x); outputs -83.829785 This is already in longitude and does not need to be converted to be sent to Survey123. Since the conversion was still being run though, Survey123 was being sent something that is approximately 0. I have no idea why this change happens, but I made a small edit to Mark's geometry code that checks if the absolute value of var polyx = text(centroid($feature).x); is greater than 10,000. If it is, then it runs the conversion, if it isn't then it doesn't. This means the custom expression is now working in the Arcmap Online map and on the Collector Aurora (I have tested it on my iPad). Such a simple fix that was ridiculously frustrating to find! Here is the full code for anyone else who runs into weird issue. var polyx = text(centroid($feature).x); var polyy = text(centroid($feature).y); function metersToLatLon(mx, my) { var originShift = 2.0 * PI * 6378137.0 / 2.0; var lon = (mx / originShift) * 180.0; var lat = (my / originShift) * 180.0; lat = 180.0 / PI * (2.0 * Atan(Exp(lat * PI / 180.0)) - PI / 2.0); return [lat, lon]; } var latlon = ""; var result = ""; var latlon = []; if (Abs(polyx) > 10000) { latlon = metersToLatLon(polyx, polyy); } else { latlon = [Number(polyy), Number(polyx)] } result = Round(latlon[0], 6) + ', ' + Round(latlon[1], 6); return result;
... View more
04-12-2019
09:03 AM
|
2
|
3
|
10230
|
POST
|
The most honest answer is because I didn't know that was an option (I did know it was possible for Survey123, but hadn't realized the same option was available for Collector) Doing some quick research into it, this post How To Side Load Your Own Tile Package For Offline Use? (more specifically the response by russell_roberts-esristaff) makes it sound like this would have to be done on a device by device basis. I am trying to make the process of using this as simple as possible as not all the Users collecting the data will be technologically savvy. As such the download and begin use process needs to be straight forward and not require sharing files that must be added to the device separately. Thank you for making me aware of this option though! It could definitely come in handy for other projects and please let me know if I'm misunderstanding the side load process.
... View more
11-20-2018
12:22 PM
|
0
|
0
|
1280
|
POST
|
Hey Rachel, I have the most basic role, and I have the feeling this is the issue. I did have our office's official ArcGIS employee test publishing the tpk file as well, and she didn't have the option to publish either. She might not be a full Online Administrator either though. I will check with her and see if we can check her permissions.
... View more
11-20-2018
12:16 PM
|
0
|
0
|
1280
|
POST
|
Unfortunately I cannot. I do not have permissions to create groups and we cannot add non Forest Service employees to our groups for security. I did try sharing the group with our head Arcgis person in my office and opening it up in her account. There still wasn't a publish option or a way to add it to the map (I shared the map with her as well of course) Sorry I can't do more on that. As a side note, I did set the Area of Interest property to a polygon layer of my required area. I was hoping this would help restrict the size of the TPK. Could this cause an issue in uploading it to Arcmap Online?
... View more
11-15-2018
12:02 PM
|
0
|
0
|
1280
|
POST
|
I am making a campsite collection app (Using Collector and Survey123) that will be used in wilderness areas and has to be able to be used offline. I have a hosted feature layer from Survey123 that is the campsites and it is sync-enabled and I previously had three other files that were uploaded as zipped shape files. These files were the wilderness boundaries, trails, and roads around wilderness. This prevented it from being an offline map though, so I removed them and was working on making a TPK file and hosting it instead. I followed the instructions found here Publish hosted tile layers from files—ArcGIS Online Help | ArcGIS under Publish Large Tile Packages to create and share the package. More specifically: Generate Tile Cache Tiling Scheme (I skipped this as I wanted to use the Arcgis online scheme) Manage Tile Cache (Ran fine) Export Tile Cache (Ran fine after I remembered to select Tile Package instead of Tile Cache) Share Package (Uploaded and is now in my content as expected The first time I ran this I selected all 20 scale sizes and ended up with a massive 2.8GB TPK file. I then had troubles with the next steps 5. Go to Content > My Content (Yep, still able to do this) 6. Click your tile package to display its item details page (Yep, TPK is there and item page opens) 7. Click Publish (......publish is definitely not an option...) Publish is not an option within my item details page and when I try to add layers to my map, the Hosted TPK does not show up. While scanning forums this last week to solve this, I think I found somewhere that said there was a 2GB limit. Because of this, I made a new TPK following the same steps but only used 16 scale sizes (didn't use the last 4 that take up the most space aka smallest scale). This new TPK is only 56MB but still does not have a Publish option and does not appear as a layer to be added on my map. I did update the metadata for my Hosted TPK file to ensure it had all required fields and was valid. I'll attach two screenshots to help show what I'm discussing. The first (Proof1.png) is the Item Details Page of the TPK file and the second will be the map view (Proof2.png). I would appreciate any information or assistance on what I'm doing wrong. If nothing else I know I can host the three layers instead, but the TPK file is much better as it includes labels, contour lines, and other small details.
... View more
11-15-2018
08:12 AM
|
0
|
6
|
1540
|
POST
|
I would like to re-prompt Matt's question. It does not appear that Collector is supporting Arcade Custom Expressions yet, but do we have any timeline on when or even if it will be possible?
... View more
11-06-2018
01:14 PM
|
0
|
18
|
2839
|
POST
|
Hey Scott, No I have not used the complex expression in Collector. I was trying to get it to work in the Map Viewer. In Map viewer opening the table of for the layer the Attribute Expression is in shows a field for the calculation, but it is blank for each Point. If I click that point, the popup opens and has a link that I described above that should have a URL generated from my complex expression, but when I click said link the area that should be created from my expression is blank. Since my first posting I have tinkered with it and it almost seems like the output string is simply too long to work??? If I keep all of the same code but simply have the final output (last return statement) a much shorter string the previously mentioned table and url link shows the appropriate string. Because of this I stopped trying to have one complex expression and broke each field that actually required a calculation (Campsite_ID_Number, Campsite_Orig_Year, Location, District, Wilderness_CRD, Wilderness_BRRD, Wilderness_CRRD) into each of their own expressions. These are all working and showing up in the table with the expected output and when I click the link in the popup (in Map Viewer) the appropriate link is made, it opens survey 123, goes to the correct survey, fills out all the correct fields (including the correct location). I got really excited at this point, saved my map, and launched Collector on an iPad and the link here does not work. It appears that the fields are not calculating and the survey is being passed a literal string of "{expression/expr5}" instead of a calculated value. If this is too separate of an issue I can create a new question for it, but I also haven't had a chance to search the forums to see if anyone else has had the same issue yet. Anyways, I would love any further advice about the original issue of this post or the current one I just mentioned! I just got assigned to go help one of our field crews in a wilderness area for the next week as their down some staff, but once I get back to civilization, I can take some screenshots of what I'm noticing and post them, if it helps. Thank you!
... View more
09-26-2018
03:43 PM
|
1
|
1
|
1054
|
POST
|
I am currently making Collector/Survey123 data collection and map for inventorying campsites. I am opening Survey 123 from collector by adding a link in the pop-up following arcgis's url scheme. Many of the fields have to be calculated and so I made a single attribute expression that creates the majority of the link which I named Resurvey Link {expression/expr0}. Then in the url I put arcgis-survey123://{expression/expr0} but when I click the link it simply appears as arcgis-survey123:// If I open the attribute table, under Resurvey Link the two campsites I currently have in the dataset are empty. When I test the code within the expression I get the exact result I expected, not a blank string.... Attached below is the entire expression and then the output when I test it. function getCampsiteId() { return Number(Split($feature["Campsite_ID"], "-")[5]); } function getCampsiteOrigYear() { var iYearShort = Number(Split($feature["Campsite_ID"], "-")[4]); var sYear = ''; if (iYearShort <= 99 && iYearShort >= 94) { sYear = '19' + iYearShort; } else { sYear = '20' + iYearShort; } return Date(Number(sYear), 0, 1); } function getDistrict() { return Decode($feature.Wilderness, 'Blood Mountain Wilderness Area', 'BRRD', 'Brasstown Wilderness Area', 'BRRD', 'Cohutta Wilderness Area', 'CRD', 'Mark Trail Wilderness Area', 'CRRD', 'Raven Cliffs Wilderness Area', 'CRRD', 'Rich Mountain Wilderness Area', 'BRRD', 'Tray Mountain Wilderness Area', 'CRRD', ''); } function getGeometry() { var poly = Geometry($feature); var result = ''; if (!IsEmpty(poly)) { var latlon = metersToLatLon(poly.x, poly.y); result = Round(latlon[0], 6) + ',' + Round(latlon[1], 6); } return result; } function getResurveyLink() { var link = '?itemID=2aab379ca46543e9a812ef07a387c802'; var geom = getGeometry(); var fields = [ {name: 'District', val: getDistrict()}, {name: 'Wilderness_CRD', val: getWilderness('CRD')}, {name: 'Wilderness_BRRD', val: getWilderness('BRRD')}, {name: 'Wilderness_CRRD', val: getWilderness('CRRD')}, {name: 'New_Site', val: 'no'}, {name: 'Date_Orig_Collection', val: getCampsiteOrigYear()}, {name: 'Campsite_ID_Number', val: getCampsiteId()}, {name: 'Dist_Along_Trail', val: $feature["Dist_Along_Trail"]}, {name: 'Date_Collected', val: Now()}, {name: 'Ground_Dist', val: $feature["Ground_Dist"]}, {name: 'Tree_Damage', val: $feature["Tree_Damage"]}, {name: 'Disturbed_Area', val: $feature["Disturbed_Area"]}, {name: 'Overall_Imp', val: $feature["Overall_Imp"]}, {name: 'Between_Trail_Stream', val: $feature["Between_Trail_Stream"]}, {name: 'Water_Source', val: $feature["Water_Source"]}, {name: 'Water_Dist_FT', val: $feature["Water_Dist"]}, {name: 'Social_Trails', val: $feature["Social_Trails"]}, {name: 'Main_Trail_Designated', val: $feature["Main_Trail_Designated"]}, {name: 'Trail_Dist_FT', val: $feature["Trail_Dist"]}, {name: 'Impact_Area', val: $feature["Impact_Area"]}, {name: 'Litter_Trash', val: $feature["Litter_Trash"]}, {name: 'Pot_Site_Expan', val: $feature["Pot_Site_Expan"]}, {name: 'NNIS_Presence', val: $feature["NNIS_Presence"]}, {name: 'Site_Condi', val: $feature["Site_Condi"]}, {name: 'Rec_Site_S', val: $feature["Rec_Site_S"]}, {name: 'Admin_Structures', val: $feature["Admin_Structures"]} ]; for (var i=0, j=Count(fields); i<j; i++) { link += '&field:' + fields.name + '=' + fields.val; } link += '¢er=' + geom; return link; } function getWilderness(sWild) { if (sWild == 'CRD') { return Decode($feature.Wilderness, 'Cohutta Wilderness Area', 'CO', ''); } else if (sWild == 'BRRD') { return Decode($feature.Wilderness, 'Brasstown Wilderness Area', 'BR', 'Blood Mountain Wilderness Area', 'BM', 'Rich Mountain Wilderness Area', 'RM', ''); } else if (sWild == 'CRRD') { return Decode($feature.Wilderness, 'Mark Trail Wilderness Area', 'MT', 'Raven Cliffs Wilderness Area', 'RC', 'Tray Mountain Wilderness Area', 'RM', ''); } } function metersToLatLon(mx, my) { var originShift = 2.0 * PI * 6378137.0 / 2.0; var lon = (mx / originShift) * 180.0; var lat = (my / originShift) * 180.0; lat = 180.0 / PI * (2.0 * Atan(Exp(lat * PI / 180.0)) - PI / 2.0); return [lat, lon]; } return getResurveyLink(); Test Result ?itemID=2aab379ca46543e9a812ef07a387c802&field:District=BRRD&field:Wilderness_CRD=&field:
Wilderness_BRRD=BR&field:Wilderness_CRRD=&field:New_Site=no&field:
Date_Orig_Collection=2018-01-01T00:00:00-05:00&field:Campsite_ID_Number=2&field:
Dist_Along_Trail=&field:Date_Collected=2018-09-25T15:39:29-04:00&field:Ground_Dist=2&field:
Tree_Damage=2&field:Disturbed_Area=1&field:Overall_Imp=5&field:Between_Trail_Stream=&field:
Water_Source=3&field:Water_Dist_FT=60&field:Social_Trails=4&field:
Main_Trail_Designated=SystemTrail&field:Trail_Dist_FT=20&field:Impact_Area=2&field:
Litter_Trash=Heavy&field:Pot_Site_Expan=Medium&field:NNIS_Presence=Unknown&field:
Site_Condi=Fair&field:Rec_Site_S=Exists-GenSiteMaint&field:Admin_Structures=&
center=34.346803,-83.807537 Not sure what I'm doing wrong. I originally had null instead of blank strings in the Decode functions default value parameter, but switched them to test if that was the issue. Any help would be appreciated to get me on the right track. It seems like my logic is functional, but I've messed something up somewhere...
... View more
09-25-2018
12:42 PM
|
0
|
3
|
1242
|
Title | Kudos | Posted |
---|---|---|
2 | 04-12-2019 09:03 AM | |
1 | 09-26-2018 03:43 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|