|
POST
|
Did you forget the format call on the SQL string in line 7 in the script? If that's just a copy/paste typo, try wrapping the Counties polygons and each Well FC in an arcpy.management.MakeFeatureLayer call and work with the output layer, there's a good chance your selection is silently failing on a non-layer input. Another method is to merge all your wells into one big FC, spatially join it to the Counties, then select every record where the county name doesn't match the original FC name (the "add_source" parameter on the Merge tool makes this easy if your version of Pro supports it). This avoids fiddling with dynamic selections and should run much faster due to batching all the geometry calculations.
... View more
01-26-2023
08:43 AM
|
1
|
0
|
1759
|
|
POST
|
Did you install this version of the .NET runtime specifically?
... View more
01-26-2023
08:25 AM
|
1
|
2
|
1548
|
|
POST
|
I've got a table setup with traditional versioning + archiving and I'm planning to move it to branch versioning. Other than compressing everything out of the delta tables I'm not too sure how to proceed. Can you just disable versioning and then enable it again through a branch connection? Will that handle the "_H" archive table or will I need to transform that into the branch format? I'm willing to work with SQL Server directly for whatever's required, just wanted to see if anyone has tried this before.
... View more
01-19-2023
01:59 PM
|
1
|
2
|
5490
|
|
POST
|
Try adding a derived output parameter to your tool, then using the "SetParameter" or "SetParameterAsText" function in your script to put the output features into that parameter. Tools don't output data unless they have an output parameter configured. Also for the future, what you're writing is a script tool in a normal toolbox, a Python toolbox is a different beast entirely.
... View more
01-19-2023
01:00 PM
|
1
|
1
|
2512
|
|
POST
|
If multiple apps pull from the same web map, any changes to that map will propagate to all apps. You may have to open the app and tweak anything that doesn't automatically carry over, which items require manual updates depends on the app platform and the specific components of each app, best to keep write down what does and doesn't update.
... View more
01-19-2023
12:56 PM
|
0
|
0
|
1388
|
|
POST
|
Those default Shape fields are calculated automatically by the database backing the data using the spatial reference of the feature class. In most cases they're completely useless and should be ignored. There's a few ways to get the proper area for a feature: Good ol' Calculate Geometry Attributes. This gives you the most flexibility in how you do the math and the output units, but you'll have to run the tool every time a feature updates which won't work for every workflow. Use the Area or AreaGeodetic Arcade functions in a popup or attribute rule. The former does the calculation every time a user picks a feature in a web map in the popup only, the latter does the calculation on every insert/update and stores the result in a field. This gives you real-time updates on the Area, the catch is "Area" doesn't let you specify the spatial reference so you'll have to test what reference it uses for the calculations. If that isn't good enough then you'll have to use AreaGeodetic, which is fine for most purposes but you may be required to calculate geometry in a specific SR which means you'll have to fall back to option 1. Give these options a try, you should find something that suits your workflow and requirements.
... View more
01-19-2023
09:33 AM
|
1
|
1
|
3753
|
|
POST
|
You can get the length of a string with the COUNT function, then you can use that length to pick which branch to take.
... View more
01-17-2023
04:44 PM
|
0
|
0
|
3283
|
|
POST
|
If I'm understanding your question correctly: merge both district layers together, then spatially join the precincts to the combined districts to determine which one it lands in. If the precinct can span multiple districts then the Intersect tool combined with a check for the largest intersecting area could prove more useful.
... View more
01-17-2023
04:41 PM
|
0
|
0
|
655
|
|
POST
|
Ah that makes more sense. In that case you can probably just make the "ma" variable the name of each new feature layer, that way you can change selection sets and such without clobbering the other layers.
... View more
01-13-2023
02:36 PM
|
0
|
0
|
4052
|
|
POST
|
For what it's worth, here's what the selectors look like after I ran the CSS through a formatter: .sassy-theme .esri-widget .sassy-theme .esri-widget--button, .sassy-theme .esri-menu, .sassy-theme .esri-popup, .sassy-theme .esri-popup__main-container{
background-color: rgb(27, 27, 9);
}
.sassy-theme .esri-widget.esri-search, .sassy-theme .esri-search .esri-widget--button , .sassy-theme .esri-widget .esri-menu {
background-color: rgb(198, 198, 63);
color: rgb(121, 5, 50);
font-size:larger;
font-family: 'Montserrat';
}
.sassy-theme .esri-attribution .sassy-theme .esri-attribution a .sassy-theme .esri-popup .esri-attribution .sassy-theme .esri-popup .esri-popup__pointer-direction, .sassy-theme .esri-popup .esri-popup__button, .sassy-theme .esri-button, .sassy-theme .esri-input, .sassy-theme .esri-widget a The formatter flagged the last line as an error, maybe the extra definitions are conflicting with something? If it's not that, crack open your dev tools and look at the cascade order on those text elements. You might have to select a more specific element, maybe something related to tables.
... View more
01-13-2023
01:54 PM
|
0
|
1
|
1773
|
|
POST
|
I have a feeling that conflating a layer with its underlying data is causing issues here. You're attempting to wipe data with the path "memory/veg_layer" and then creating a feature layer from another data source with the layer name "memory/veg_layer". It looks like you already have the data in your "inrev_data_by_model_area[ma]" object so if you should probably create the feature layer outside the loop and reuse it each go around. Or create a new feature layer each loop with a different name, something like: for i, thing in enumerate(things):
lyr = arcpy.management.MakeFeaturelayer(inrev_data_by_model_area[ma], f"layer_{i}")[0]
# Do stuff with lyr??? Lastly, check your environment settings. If overwriting data is disabled it can lad to issues like this. A common pattern is to store the value of arcpy.env.overwriteOutput, set it to true, run the code that overwrites data, then set the env variable back to the previous state to avoid overwriting the user's preferences unnecessarily.
... View more
01-13-2023
01:33 PM
|
1
|
2
|
4076
|
|
POST
|
The "strftime" method on Python datetime objects is the go-to way to get a stable text version of that data. Here's an example for Calculate Field: !Created_Date!.strftime("%Y-%m-%d %H:%M:%S") For a full list of format codes check out https://strftime.org. If you want true live updates you'll probably want to look into Attribute Rules, here's an example for Arcade: Text($feature["Created_date"], "Y-MM-DD HH:mm:ss") The reference for this is https://developers.arcgis.com/arcade/function-reference/text_functions/#text. There's disagreements in how the format codes work between the reference and the sample code so play around with the various opstions.
... View more
01-13-2023
12:00 PM
|
1
|
0
|
1376
|
|
POST
|
As per the good word, if you grab a shapefile with this tool the output will also have the .shp suffix. You're better off with Feature Class To Feature Class and Table to Table instead as this gives you control over the output name.
... View more
01-13-2023
11:22 AM
|
0
|
1
|
2309
|
|
POST
|
Here's the link to the documentation: https://www.esri.com/en-us/arcgis/products/arcgis-dashboards/resources. Try building some basic dashboards with the info you find here and come back here if you have a specific question the docs couldn't help you with. Don't forget that you need ArcGIS Online or ArcGIS Enterprise access and relevant data to get started. Have fun!
... View more
01-13-2023
11:15 AM
|
1
|
0
|
942
|
|
POST
|
If you store your temporal data adjusted to UTC then you can either convert it to the user's current time (some applications will do this automatically, otherwise you can use a conversion function, such as Arcade's "ToLocal"). If you need to store the data in the local time zone of capture, you can create a second field, then combine the UTC time with a spatial join to time zone polygons and apply the appropriate offset. Don't try to be clever with hardcoded offsets, time zones are subject to change at any time so you'll need a copy of the time zone boundaries relevant to your date range. For live data going forward you can use the World Time Zones service from the Living Atlas, for historical data you'll have to track down historical zones. Handling time zones outside of your current locale is one of the toughest computer problems out there so good luck!
... View more
01-12-2023
03:27 PM
|
0
|
2
|
2177
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-24-2023 11:47 AM | |
| 2 | 04-09-2026 11:36 AM | |
| 1 | 09-08-2023 10:07 AM | |
| 3 | 03-26-2026 08:11 AM | |
| 2 | 03-12-2026 01:41 PM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|