|
POST
|
the issue seems to be related to the field names being more than 30 characters in length, well that's the issue i was having
... View more
06-16-2025
11:57 PM
|
0
|
0
|
419
|
|
POST
|
you should be able to see the tasks if your an admin, its under Manage in the notebooks tab
... View more
06-16-2025
11:54 PM
|
1
|
0
|
851
|
|
POST
|
i have an experience builder app which has a map and the map has 4 layers in it, i want to clone the app and the map and only 1 of the 4 layers and then to remap the cloned feature service into the cloned map. i've tried this but it copies all 4 layers, i even tried the item_mapping and used the same id as both from pathlib import Path
import sys
import pandas as pd
from arcgis.gis import GIS, Item
from arcgis.env import active_gis
from arcgis.features import FeatureLayerCollection
from arcgis.mapping import WebMap
source = GIS("home")
print(source)
target = GIS("home")
print(target)
group = source.groups.search("id: 8d..fd")[0]
for item in group.content():
print(item['title'])
print(item['id'])
xid = item['id']
items = source.content.search(query="id:{0}".format(xid))
#items
for item in items:
try:
print("Cloning " + item.title)
copy_list = []
copy_list.append(item)
print (copy_list)
if (item.title == "In_Map"):
item_mapping = {"db..d77" : "db..d77"}
target.content.clone_items(copy_list, copy_data=True, search_existing_items=True, item_mapping = item_mapping, folder="In_Map_Test_version")
else:
target.content.clone_items(copy_list, copy_data=True, search_existing_items=True,folder="In_Map_Test_version")
print("Successfully cloned " + item.title)
except Exception as e:
print(e) any ideas?
... View more
05-09-2025
07:29 AM
|
0
|
1
|
1138
|
|
POST
|
i'm trying to create this portal to allow someone to audit field surveys. the auditor selects the survey to audit from the list, it then selects the audit feature which is related to the survey but as soon as they update a question on the table it disappears and you get this just a blank table
... View more
02-12-2025
02:49 AM
|
0
|
1
|
551
|
|
POST
|
thanks @DavidPike i changed the spatial reference when querying my layers and it works, even gives me the correct distance
... View more
01-10-2025
01:22 AM
|
2
|
0
|
332
|
|
POST
|
this is the geometry of one of the polylines {"geometry": {"paths": [[[-1.04626706475298, 52.5312679471987], ........ [-1.0447855316579, 52.5304270718345]]], "spatialReference": {"wkid": 4326, "latestWkid": 4326}} this is the geometry for one of the points {"geometry": {"x": -1.0453711186340822, "y": 52.53063399067387, "spatialReference": {"wkid": 4326, "latestWkid": 4326}} thanks for the help Stu
... View more
01-09-2025
06:36 AM
|
0
|
1
|
2554
|
|
POST
|
this is the code: for xbsg in bsgPoints:
print(xbsg.attributes["objectid"])
print(xbsg)
access_point = Point(xbsg.geometry)
access_res = access_polyline.query_point_and_distance(access_point)
if (access_res):
print(access_res)
print("--++--")
print(access_res[0].JSON)
print("----") this is the code's closest point but i was expecting this as the closest point: and this is the distances returned: i also found that post and it suggests that the distance is the second item so 0.001106969364200805
... View more
01-09-2025
06:03 AM
|
0
|
2
|
2557
|
|
POST
|
it also looks like its only getting the closest vertex rather than the closest point on the line unfortunately
... View more
01-09-2025
03:17 AM
|
0
|
1
|
2559
|
|
POST
|
thanks @DavidPike that was the issue it looks like its returning the distance now but it looks like its in radians?
... View more
01-09-2025
01:39 AM
|
0
|
0
|
2571
|
|
POST
|
so this sounds simple and if i use Near in Pro it is but i want to create a AGOL python notebook to run once a day to loop over any point features created that day and get the closest XY to a feature service of polylines (50k features) i tried following the example here Part 3 - Spatial operations on geometries | ArcGIS API for Python but even if i just manually populate the geomenty json for both the point and the polyline it returns None
... View more
01-08-2025
06:14 AM
|
1
|
10
|
2950
|
|
POST
|
this for some reason the feature layers are all now showing with a wkid and select by location now works... very odd Stu
... View more
11-18-2024
03:15 AM
|
0
|
0
|
1079
|
|
POST
|
How can i add a spatial reference to a feature service? my feature service is not showing a spatial reference when querying the extent but if i check another feature service it shows one i think this is the cause of why my intersection or select by location in pro returns 0 results or just fails
... View more
11-15-2024
06:18 AM
|
0
|
2
|
1142
|
|
POST
|
i change it to use the field calculator instead of the update cursor, it works but the downside is its significantly slower 😔 with arcpy.da.SearchCursor(fc, ["objectid", "FeatureID","Angle" ,"SHAPE@", "SHAPE@X", "SHAPE@Y","LEGACY_TABLE_NAME"],"objectid in (4011345,4011328,4011327,4011326,4011325,4011324,4011323,4011346)") as Cur:
for row in Cur:
# read in the data
print row[0]
SA_Filter = "OBJECTID = {0}".format(row[0])
print SA_Filter
try:
arcpy.management.SelectLayerByAttribute(fc, "NEW_SELECTION", SA_Filter)
annocount = arcpy.management.GetCount(fc)
print "tmp count: {0}".format(annocount[0])
if int(annocount[0]) == 1:
print "selected one anno"
arcpy.management.SelectLayerByLocation(fc, "INTERSECT", fc, "", "NEW_SELECTION")
tmpcount = arcpy.management.GetCount(fc)
print "tmp count: {0}".format(tmpcount[0])
if int(tmpcount[0]) >= 2 and int(tmpcount[0]) < 74:
print "more than 1"
arcpy.management.SelectLayerByAttribute(fc, "NEW_SELECTION", SA_Filter)
arcpy.CalculateField_management(fc, "Angle",
"!ANGLE!+90",
"PYTHON_9.3")
except Exception as e:
print "Error with message: {0}".format(e)
... View more
10-31-2024
03:48 AM
|
0
|
1
|
2493
|
|
POST
|
but oddly if i reconcile my session and refresh the map it has updated the first one i'm thinking the issue is the arcfm session side
... View more
10-31-2024
02:17 AM
|
0
|
0
|
2511
|
|
POST
|
Hi @BrandonMcAlister thanks i tried that and it still failed, i even recreated the data and re-ran it incase the data had been corupted with arcpy.da.SearchCursor(fc, ["objectid", "FeatureID","Angle" ,"SHAPE@", "SHAPE@X", "SHAPE@Y","LEGACY_TABLE_NAME"],"objectid in (4011345,4011328,4011327,4011326,4011325,4011324,4011323,4011346)") as Cur:
for row in Cur:
# read in the data
print row[0]
SA_Filter = "OBJECTID = {0}".format(row[0])
print SA_Filter
try:
arcpy.management.SelectLayerByAttribute(fc, "NEW_SELECTION", SA_Filter)
annocount = arcpy.management.GetCount(fc)
print "tmp count: {0}".format(annocount[0])
if int(annocount[0]) == 1:
print "selected one anno"
arcpy.management.SelectLayerByLocation(fc, "INTERSECT", fc, "", "NEW_SELECTION")
tmpcount = arcpy.management.GetCount(fc)
print "tmp count: {0}".format(tmpcount[0])
if int(tmpcount[0]) >= 2 and int(tmpcount[0]) < 74:
print "more than 1"
with arcpy.da.UpdateCursor(fc, ["objectid", "FeatureID","Angle" ,"SHAPE@", "SHAPE@X", "SHAPE@Y","LEGACY_TABLE_NAME"],"objectid = {0}".format(row[0])) as UPDCur:
for upd in UPDCur:
print "entered Update cursot"
upd[2] = float(upd[2]) + 90
upd[6] = "te22st"
UPDCur.updateRow(upd)
except Exception as e:
print "Error with message: {0}".format(e)
... View more
10-31-2024
02:13 AM
|
0
|
0
|
2511
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-16-2025 02:25 AM | |
| 1 | 09-08-2025 07:14 AM | |
| 8 | 07-17-2025 01:23 AM | |
| 3 | 07-04-2025 02:55 AM | |
| 1 | 06-27-2025 03:41 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|