POST
|
If you make "params" a proper function parameter and pass it in every time does that help?
... View more
Wednesday
|
0
|
0
|
20
|
POST
|
I assume you have, say, 3 category selectors (A, B, C) and you want anything that matches A OR B OR C, right? I haven't played around with data expressions much but in theory you can combine all three fields into one category by getting the cross product of their unique values, then repeat that in the data expressions for the data you want to filter. Now that you have matching key fields everywhere you can have a single multi-select category filter that works for everything.
... View more
Wednesday
|
1
|
0
|
84
|
POST
|
If you pick regular JSON then it'll assume the file is using ESRI's internal JSON format, so it won't produce any meaningful results with GeoJSON.
... View more
Monday
|
0
|
0
|
98
|
POST
|
I grabbed some data of my own and it ran through JSON to Features with the geometry type set to Point for one set of features and Polyline for another. The points were attributed and the lines were not. Maybe try that tool and see if it meets your requirements.
... View more
Monday
|
0
|
2
|
107
|
POST
|
That snippet is an error prone and roundabout way of doing: #Extract Tax Parcels from Parcel Editing (Feature Service on Portal)
field_name = "Name"
source = r"UPDATEDENTERPRISE/HOSTED//FEATURELAYER/FeatureServer/0"
fc = r"UPDATEDENTERPRISE/HOSTED//FEATURELAYER/FeatureServer/0"
CSVFile = r"S:\LOCALSERVERPATH\GISDATA.csv"
query = f"""("{field_name}" NOT LIKE BLAHBLAHBLAH)"""
with open(CSVFile, 'w') as f:
f.write(field_name + '\n') #csv header
with arcpy.da.SearchCursor(fc, field_name, query) as rows:
for value, in rows: # Deconstruct the single-item tuple into a single variable using the for loop
f.write(value + '\n')
print("CSV File Created for GIS") This makes the intent clearer and you'll get a more obvious error if the dataset lacks a "Name" field.
... View more
Monday
|
1
|
0
|
66
|
POST
|
My go-to is the List Subtypes function in arcpy, something like: def subtype_field(dataset):
return next(iter(arcpy.da.ListSubtypes(dataset).values()))["SubtypeField"] If the returned value is the empty string then you know there's no subtypes.
... View more
Monday
|
1
|
0
|
115
|
POST
|
If you're on 11.3 you should be able to do anything in this help topic. 11.1 (and maybe 11.2?) has limitations with editing related data so you'll need to stick to the old viewer until your org upgrades.
... View more
a week ago
|
0
|
0
|
81
|
POST
|
That actually works, if I ignore the error about having a field named "GlobalID" and make sure it binds to null then the proper value is still pulled down after opening the results. Thanks for digging that guide up for me!
... View more
a week ago
|
0
|
1
|
100
|
POST
|
I'm trying to create a Survey123 form that includes a link to create a new entry in another form using the current GlobalID as the parent key. Is there a way to get the current global ID within the XLSForm spec so I can build the appropriate link? It's fine if I get no GlobalID during the initial submission, I only want the link to appear for existing forms viewed through the inbox. No, I can't use repeats or anything like that to glue the forms together, I need to get the GlobalID straight up. Thanks!
... View more
2 weeks ago
|
0
|
3
|
176
|
IDEA
|
Would be nice to have this as an app-level setting that can be locked off during installation, I'd hate to troubleshoot something a junior tech did because "the computer told me to".
... View more
2 weeks ago
|
0
|
0
|
255
|
POST
|
Manipulating the clipboard like that is a faux pas for user-level programs on any OS, let alone Windows so I doubt it'll ever happen. I recommend keeping a text editor open so you can copy some simple text to clean the clipboard yourself, like a painter rinsing their brushes
... View more
3 weeks ago
|
1
|
1
|
209
|
POST
|
Last time I checked, the Data Access Cursor types return BLOB columns as memoryview objects. The docs for PIL's Image.open function say it can open any file-like object that holds binary data. If you're lucky you can just shove the memoryview in there, if not you can do something like: from io import BytesIO
from PIL import Image
with arcpy.da.SearchCursor(data, fields) as cur:
for row in cur:
data = row[index]
photo = Image.open(BytesIO(data)) I think the issue with the code above is you're decoding the binary data to base64 which is tripping up PIL, assuming your images were added to an attachment table through the standard ArcGIS methods the data is stored byte for byte without any special encoding.
... View more
a month ago
|
0
|
0
|
316
|
POST
|
if not arcpy.GetSigninToken():
fail()
portal = arcgis.GIS("Pro")
... View more
05-10-2024
08:28 AM
|
0
|
0
|
120
|
POST
|
The logical endpoint of this is the geoprocessing modules feature, which allow you to bundle your Python toolbox(es) as members of a standard Python package. There's a very big learning curve and you're forced to deal with Python's perpetually half-baked build systems but your reward is a fully managed, easy to read bundle of code that you can load into different environments, complete with proper dependency management. And the toolboxes are accessed just like system tools which is pretty slick. Just watch out for using them in web tools, that's a whole other can of worms.
... View more
05-09-2024
04:54 PM
|
2
|
0
|
231
|
Title | Kudos | Posted |
---|---|---|
1 | Wednesday | |
1 | Monday | |
1 | Monday | |
1 | 3 weeks ago | |
1 | 05-10-2024 08:43 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|