|
POST
|
Is there a list of which Python version (e.g. 3.7, 3.9 etc.) is included with each version of Pro? My team has had to keep an old version of Pro around to maintain version compatibility with our Enterprise Python environment and a table like this would've saved a few hours of trial and error installing different versions. This table already exists for Enterprise so I'm not sure why I can't find the same resource for Pro.
... View more
10-26-2023
04:42 PM
|
0
|
5
|
4012
|
|
POST
|
I'm not sure where this ms level noise is coming from (especially with strptime) but this StackOverflow answer looks like a valid solution when combined with a good old Field Calculation run.
... View more
10-26-2023
04:35 PM
|
0
|
0
|
3656
|
|
POST
|
Here's a (untested) Field Calculator code block: def reclass(value):
lookup = {
"Coniferous": "Tree",
"Deciduous": "Tree",
"Igneous": "Rock"
}
return lookup.get(value, value) You write something like "reclass(!my_field!)" and it'll map the inputs to the outputs as defined in the "lookup" dictionary, but leave them unchanged if it's not in the list. Alternatively, you can load the old and new values into a table, join the tables on the common key field, then field calculate over the data. This'll let you maintain a lookup table as standard ArcGIS data instead of Python code if that works better.
... View more
10-26-2023
08:39 AM
|
1
|
1
|
1284
|
|
IDEA
|
When Power Automate is connected to Survey 123 using this method for Enterprise the only surveys available are those owned by the account embedded in the workflow. I propose expanding this to any survey shared with the embedded account so they can run workflows for surveys other organization members own. Our team needs to grant access to an external user solely for working with existing surveys, which is impossible to control if the embedded user also owns the survey. Expanding what the workflow can access without changing the user's scope would fix this issue.
... View more
10-24-2023
01:26 PM
|
1
|
0
|
586
|
|
POST
|
To keep things simple: we can't give the Power Automate users the ability to alter the surveys in any way, their only ability should be to pull completed surveys through the webhook. Unless there's a way to get that working I'll have to take this to the Idea Zone. Thanks for the clarification.
... View more
10-24-2023
10:01 AM
|
0
|
0
|
850
|
|
POST
|
For context: we're hosting all of our data in our Enterprise (10.9.1) and using Survey123 thorough the usual website with our portal URL glued on. We've tried to use webhook with Power Automate using the documented method and everything seems to work well, but only if the registered user owns every single survey. This is untenable for us as the team feeding off the webhooks is separate from the team managing the surveys, which means they need a separate account. My question is: is there a way for Power Automate to pull every survey that's shared to the registered user, not just the ones it owns? We might be able to hack around things by hosting a custom swagger file but I'm not even sure if processing surveys that are just shared to a user is allowed. More info on what we can do here is greatly appreciated!
... View more
10-23-2023
03:43 PM
|
0
|
2
|
935
|
|
POST
|
Untested, but this should get you in the ballpark: # Get this polyline object somehow, cursors with the "SHAPE@" token work well
line = get_line()
sr = line.spatialReference
start = arcpy.PointGeometry(line.firstPoint, spatial_reference=sr)
end = arcpy.PointGeometry(line.lastPoint, spatial_reference=sr)
angle, distance = start.angleAndDistanceTo(end, "GEODESIC") Peep the "angleAndDistanceTo" part of the PointGeometry docs for more info.
... View more
10-20-2023
03:18 PM
|
0
|
0
|
1004
|
|
IDEA
|
I noticed this in the new parameter controls document: To support a parameter that accepts a multiline block of text, use a controlCLSID value of {E5456E51-0C41-4797-9EE4-5269820C6F0E}. Does this mean text boxes that pass multiline string data are implemented in 3.1? I don't have 3.1 to test but at a glance it seems like this was silently implemented. If so this is an easy "Already Implemented" idea for whichever community manager stumbles across this, wink wink.
... View more
10-19-2023
10:40 AM
|
0
|
0
|
1649
|
|
POST
|
The multiprocessing module has a lot of caveats due to how Pro manages its Python environment. This link has a lot advice and some sample scripts, this might be enough to get you started.
... View more
10-18-2023
03:26 PM
|
1
|
0
|
1692
|
|
POST
|
Currently we have one big git repo that holds all the scripts and supporting files, a copy of which is cloned to our shared network drive and referenced by toolboxes on said drive. Clunky, but it hasn't collapsed so far. Our next move is to switch to geoprocessing modules which have a dependency on a "master" package, that way we don't have to implement common utilities over every project. This has its own set of challenges (teaching users how to manage environments, potential dependency conflicts, keeping the Servers in sync for web tools etc.) but it's a bit easier to manage than one fat folder full of junk.
... View more
10-13-2023
10:00 AM
|
2
|
0
|
1477
|
|
POST
|
Based solely on the quoted passage, I'd assume each path segment in the network has a fixed impedance that can vary per segment. If you want to confirm this, run several routes with various types of paths (e.g. only highway, then only local roads, then local to highway to local etc.) and graph the travel times vs distance for each route. If every route has the same impedance then you'll get a linear correlation between distance and time, if not then you won't.
... View more
10-13-2023
09:53 AM
|
0
|
0
|
735
|
|
POST
|
The publishing process is rewriting your script to adjust embedded paths but the heuristic is terrible and it'll often break your scripts. The workaround is to edit the server's copy, adjust your tool to avoid referencing external files that aren't standard ArcGIS resources, or copy those external files to the server directories.
... View more
10-10-2023
11:49 AM
|
3
|
1
|
1127
|
|
POST
|
Not a C++ guy, but a quick search brought up std::stoi if you're on C++ 11 and up and you're using exceptions in your codebase. If neither applies to you, this post covers a few options and shows an implementation using a standard C function. This all assumes you're using standard C strings, other strings will need a conversion or a custom implementation.
... View more
10-10-2023
10:18 AM
|
0
|
0
|
4670
|
|
POST
|
Clone the toolbox, export the relevant embedded scripts to Python files, rewrite the scripts so the critical paths are functions you can call with standard Python data as parameters, then throw your profiler at that. E.g., if you have a script like: import arcpy
table = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsText(1)
table_data = get_table_data(table)
new_data = transform_data(table_data)
write_data(new_data, output) Export that script and change it to something like: import arcpy
from scalene import scalene_profiler
def main(table, output):
table_data = get_table_data(table)
new_data = transform_data(table_data)
write_data(new_data, output)
if __name__ == "__main__":
scalene_profiler.start()
main("/path/to/input", "/path/to/output")
scalene_profiler.stop() And so on. The more complex your process is, the more functions you'll need to factor out so you can find the true critical path. You might also need to tweak your functions to read and write preformatted data from memory that you prepare before the profiler engages, that way you eliminate I/O operations from the benchmark as much as possible; this makes finding slow computations easier. Note that for most arcpy code, the true bottleneck is the synchronous I/O functions that arcpy provides so don't be surprised if your code runs several orders of magnitude faster with the I/O stubbed out. Happy hunting!
... View more
09-28-2023
01:51 PM
|
1
|
1
|
2479
|
|
POST
|
For future travellers, here's the unfathomably hacky workaround I figured out: Copy and paste the map to a "label map". Remove all layers in the label map save for the label layer. Ensure the map has a transparent background. Remove the label layer from the original map. Return to the layout and copy-paste the original map's frame to a "label map frame". Copy and paste the extent from the original map frame to the label map frame. Align the label map frame to the original map frame. Ensure the label map frame has no background, borders etc. set at the frame level Order the label map frame over the layout graphics. Et voila! Labels on top of graphics on top of maps! Just make sure you have the rest of the layout 100% locked in before you do this, even with feature-linked annotations this adds a lot of work to each iteration.
... View more
09-08-2023
10:47 AM
|
3
|
1
|
5049
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | a week ago | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago |
| Online Status |
Online
|
| Date Last Visited |
11 hours ago
|