POST
|
Your points don't actually pair up (look at the sharp corners), so you'll have problems getting a 1-1 relationship to work. If you have to use these points, you can use CalculateField with an Arcade expression like this: // Calculate a new field on PointFC_1 that stores the OBJECTID of the closest Point in PointFC_2
// load PointFC_2
var point_fc_2 = FeaturesetByName($datastore, "PointFC_2")
// get points close to the current point, choose a buffer value that is big enough to get at least 1 other point!
var p_buffer = Buffer($feature, 1000, "meters")
var close_points = Intersects(point_fc_2, p_buffer)
// loop through the points and find the ID of the closest one
var min_dist = 99999
var closest_oid = null
for(var p in close_points) {
var dist = Distance(p, $feature)
if(dist < min_dist) {
min_dist = dist
closest_oid = p.OBJECTID
}
}
return closest_oid This will leave some points in FC2 without partner and it will give some points in FC1 the same partner. If you want to get a 1-1 relationship, you have to generate your points differently. Copy and edit this Python script, then run it in the Python window: polygon_layer = "TestPolygons"
point_distance = 500
buffer_distance = 100
# create output fc
points = arcpy.management.CreateFeatureclass("", "PairedPoints", "POINT")
arcpy.management.AddField(points, "PolygonOID", "LONG")
arcpy.management.AddField(points, "PointPairID", "LONG")
arcpy.management.AddField(points, "Type", "TEXT")
# generate points ON the line
points_on_lines = arcpy.management.GeneratePointsAlongLines(polygon_layer, "PointsOnLines", 'DISTANCE', point_distance)
# read the polygon geometries as dict {OBJECTID: Geometry}
polygon_shapes = {p[0]: p[1] for p in arcpy.da.SearchCursor(polygon_layer, ["OID@", "SHAPE@"])}
# start inserting points into the output fc
with arcpy.da.InsertCursor(points, ["SHAPE@", "PolygonOID", "PointPairID", "Type"]) as i_cursor:
# loop through the points on the line
with arcpy.da.SearchCursor(points_on_lines, ["SHAPE@", "ORIG_FID", "OID@"]) as s_cursor:
for shp, poly_id, point_id in s_cursor:
# get the polygon this point is on
poly_shp = polygon_shapes[poly_id]
# create a small buffer around the point
p_buffer = shp.buffer(0.01)
# get the 2 points where the buffer intersects with the polygon
i_points = p_buffer.intersect(poly_shp, 1)
sr = poly_shp.spatialReference
fp = arcpy.PointGeometry(i_points.firstPoint, sr)
lp = arcpy.PointGeometry(i_points.lastPoint, sr)
# calculate the angle between those points -> line angle at the curretn point
angle = fp.angleAndDistanceTo(lp)[0]
# create two points perpendicular to the line
p1 = shp.pointFromAngleAndDistance(angle + 90, buffer_distance)
p2 = shp.pointFromAngleAndDistance(angle + 90, -buffer_distance)
# calculate if the points are inside or outside the polygon
p1_type = "OUTSIDE" if p1.disjoint(poly_shp) else "INSIDE"
p2_type = "INSIDE" if p1_type == "OUTSIDE" else "OUTSIDE"
# insert both points
i_cursor.insertRow([p1, poly_id, point_id, p1_type])
i_cursor.insertRow([p2, poly_id, point_id, p2_type])
... View more
10-17-2022
03:20 AM
|
0
|
0
|
413
|
POST
|
Yes this is exactly what I do and what my write up is. I would leave the geopoint myself. You can see things like they did not pick the right polygon really easily. Our crews mess up the points on the regular and we use the form GPS to easily fix them since we know which one you meant. They also tend to skip Field Maps and go right to 123 on the 3rd-10th form so they all get blank ids. Really handy to just leave it. Arc is mapping so it all works better when spatial. At this point I am not sure your issue it seems ok to me. Feel free to DM me and I can take a look or chat.
... View more
08-29-2022
03:27 PM
|
0
|
0
|
459
|
POST
|
I am also having the same issue on a Samsung. Can see all the data download and then the install on device fails. The download works fine on iOS. Logging shows: Mon Aug 22 11:22:17 GMT+09:30 2022 : [DOWNLOAD] - [e017b8d831b54f368fee12a286ab66a4] - Layer: OpenStreetMap - Error: com.esri.arcgisruntime.internal.jni.CoreRequest cannot be cast to com.esri.arcgisruntime.internal.jni.CoreFileRequest : Mon Aug 22 11:22:17 GMT+09:30 2022 : [DOWNLOAD] - [e017b8d831b54f368fee12a286ab66a4] - The map download contains one or more errors
... View more
08-21-2022
07:24 PM
|
0
|
0
|
461
|
POST
|
Hi @GarrettRSmith, You would need to rebuild the apps and upload them again to the App Store and Play Store. Best, Trevor
... View more
07-19-2022
04:58 PM
|
0
|
0
|
227
|
POST
|
Thanks for the suggestion. I used Raster Calculator to perform a Jaccard Similarity analysis between the two layers.
... View more
07-19-2022
02:42 PM
|
0
|
0
|
756
|
POST
|
Hello @ZacharySutherby and @DougBrowning. Instead of opening the point layer, I opened the entire feature layer in Map Viewer Classic. The points and tables were present and I performed a join to create view feature layers for each of the tables. People have collected data after performing this task and the points are updating on their associated online maps. Not sure why I did not try this originally but thank you so much for the tips.
... View more
06-21-2022
01:56 PM
|
0
|
0
|
720
|
POST
|
Hello All. I have an online map that is being used for a dashboard and within Field Maps to direct work orders. The feature layers and attributes are collected using Survey123. Once the feature layer and attributes are collected, field workers use Survey123 to further monitor the sites and these tables are linked to the feature layer via a GlobalID/ParentGlobalID relationship. The tables are condition, agency action, and volunteer action. All of the survey tables are linked to the feature layers via joins and are hosted as view layers. They are subsequently refined using the filters in MapViewer. There is one question in the condition survey that asks if the site needs an action to be taken, if this is answered in the affirmative, conditional questions asking whether this action is an agency or volunteer action is asked. Right now I have online maps that contain filtered hosted feature layers with the filter set up to look for sites that are answered "Yes" for the action question and not answered "None" for whether it should be a agency or volunteer action. If these conditions are met, the sites show up on the maps and this is how work loads will be determined throughout the season. This all works fine. Field workers go to the sites and perform either an agency or volunteer action through Survey123 and then these locations are shown on the map on a hosted view layer. The issue that I am running into is how to clear these sites once they have been visited and an action has been taken. Each time that workers go out in the field they complete the condition survey. One idea I had is that when they were visiting to perform an action that they would mark "No" for the question that asks if the site needs an action. I thought that this would then be the newest record for the feature layer and therefore would replace, on the map at least, the point showing up as needing an action since the newest table would not be answered "Yes". Unfortunately that does not seem to the case. Right now, what I have done as a work around, is to have the actions taken layer on top of the actions needed layer, but that seems too clunky and surely there is a better way to do it. Is there a way to only have the feature layer be represented by the most recent condition survey submitted? Maybe this is something that I need to do in the joined view layer? Thanks for any and all recommendations. Garrett
... View more
06-21-2022
11:48 AM
|
0
|
0
|
152
|
POST
|
Hello, I have a hosted feature layer (points) and three related tables that are currently being created (points) or added to (tables) by a host of field workers using Survey123. Two of the three surveys will only relate to some of the points within the hosted feature layer, but this will change as the field season goes on. I am creating three new hosted feature layers that joins the points with each of the related tables. If I choose "Keep all target features" when I am performing the join in Map Viewer Classic I will have a host of features that do not have records. For example, there are currently 2,809 point locations that have been created and one of the survey tables is included in Survey123 for this initial data collection. However, for the other two surveys there are currently 70 and 203 related tables collected. Again, this will change as the season goes on, but I worry if I do not click on "Keep all target features" that when table 71 or 204 are collected that it will not carry the point with it to the new hosted feature layer. Is this correct, and if so, should I create a second hosted feature layer from the join layer to filter out those points that have records from the two surveys attached to them? Thanks for any guidance.
... View more
06-20-2022
10:54 AM
|
0
|
0
|
309
|
POST
|
Hello All. I am working on a project that contains one hosted feature layer (points) and three linked tables (surveys) via the hosted feature layer's GlobalID field. Users can either collect a new feature (Survey123) or add the surveys to already existing features (Field Maps). The three surveys relate to the feature layer's conditions and actions that can be taken by volunteers or agencies. In the condition survey there is a question that asks if the site has actions that need to be taken by agencies (this question is a list of actions agencies can take) and there is also a questions that asks if the sites has actions that need to be taken by volunteers (this question is a list of actions volunteers can take). I would like to display, on a dashboard or a web application, the sites that need agency and volunteer actions which I think that I can do via a hosted view layer using the aforementioned questions above as the filter. This will be used by work crew coordinators to direct workflow. I am using Field Maps with the feature layer as points that users will be using in the field. Users can click on the points and the Survey123 surveys are linked via links in the popup window to add the tables to the layer. I am trying to design a workflow that will allow both the agency and volunteer coordinators to see all of the sites that their workers need to take actions at. As stated above, this part seems to be easy by simply creating a view layer and hosting that on a dashboard or web application map. Where I am confused is how can I ensure that these features are cleared from the dashboard or web application map if an action is indeed taken so that they are not visited twice? Can I set an additional filter by date so only the most recent survey affiliated with the feature layer is displayed? Would it be better to set up a view layer for sites that need actions to be taken and then create Field Map offline maps for them? This is really a long question so please let me know if you need any clarification.
... View more
06-17-2022
01:59 PM
|
1
|
0
|
313
|
POST
|
Thanks for the tips. I set the repeats to hidden minimal and they do not create records.
... View more
06-17-2022
01:33 PM
|
0
|
0
|
244
|
POST
|
Getting close to the end of the day here, but I would recommend looking into experience builder. I have used it internally to allow staff to select a road segment from a pre-existing line feature class and add new information using Survey123. I would recommend watching this Webinar as well since it has some really good info about new functionality in Survey123 (i.e. editing attributes & geometry): Spring Into Top Form with ArcGIS Survey123 (esri.ca)
... View more
06-03-2022
02:01 PM
|
0
|
0
|
224
|
POST
|
I went ahead and made the decision to go ahead and revert back to the original workflow instead of banging my head against the wall trying to work this out. Thanks for all of your help.
... View more
05-10-2022
07:39 PM
|
0
|
0
|
520
|
POST
|
Hi @janderson_ksninc have you found out how to make this work? I am also having the same issue and wanted to know if you have found a workaround? I am trying to use a table for the Form ID and then two repeats that point to a polygon and line feature class. When I try to publish the survey I get an error stating: "Parent layer id 2 not found for table CampsiteArea". CampsiteArea is a polygon feature class.
... View more
05-08-2022
08:21 PM
|
0
|
0
|
749
|
POST
|
Layer goes to main table goes to repeat. See the post above I made a drawing. Sorry gotta run. In the end they all have to match names.
... View more
05-05-2022
11:13 AM
|
0
|
0
|
748
|
Title | Kudos | Posted |
---|---|---|
1 | 07-31-2023 12:14 PM | |
1 | 10-14-2022 10:16 AM | |
1 | 07-03-2022 04:33 PM | |
1 | 07-06-2022 11:26 AM | |
1 | 07-06-2022 12:32 PM |
Online Status |
Offline
|
Date Last Visited |
12-29-2023
12:34 AM
|