POST
|
Hello, I often find myself getting data in a geodatabase format, and usually first thing I want to do is just get a basic sense of contents. Im sure others do/feel the same way. If you are not familiar with it, the XRay addon for ArcCatalog has been/is great for listing feature classes, fields, domains, etc. The one thing it doesnt provide is feature counts. I havent been able to find something lightweight and simple to get the feature count information as well, so just spent a few minutes and wrote a very low-tech python code snippet. It will go through a geodatabase and print each feature class name, type, and number of records. It will also total number of feature classes and total feature at end. Attached is a python code snippet (I saved just as .txt file) that you can load (or copy/paste) to run within Arc Pro or ArcMap in command line. Just make sure to change reference to GDB on line 5. Below is exerpt of results that I ran in Pro
... View more
07-05-2023
07:12 PM
|
0
|
0
|
527
|
POST
|
Hello I want to basically clear all values in an existing raster and then replace them with values from another raster, without writing to a new raster dataset. It seem like basically all functions/tools write things to a new raster dataset. For instance if I want to make all cells in an existing raster dataset to be equal to 100 is there a tool/process without writing to a new raster? Thanks!
... View more
06-22-2023
12:44 PM
|
0
|
1
|
422
|
POST
|
Hmm... That is interesting. When I cleared the descriptions directly in AGOL it worked for me. Only thing I can suggest is maybe make sure you dont have empty spaces or returns or something. Seems rather quirky bug/nuance that hope esri fixes.
... View more
09-12-2022
04:05 AM
|
1
|
0
|
2259
|
POST
|
Hello, I have a dashboard with several indicators that show the numbers of features in the current zoom extent (one for each data source). I would like to have a separate indicator that basically sums up all the individual indicator. I have been successful in creating a custom data expression to total all the features in the individual layers, however, since that is pulling directly from the feature layer using the 'FeatureSetByID' function. Is there a way in a data expression for it to reference the return valued in another widget/indicator in the dashboard. Attached is a annotated graphic that gives context
... View more
09-10-2022
07:03 AM
|
3
|
0
|
659
|
POST
|
@SaraHopkinsand @AlexRudowski Thank you both for pointing the solution out - it is certainly not intuitive. One thing...Even easier is just to go to feature layer directly in AGOL and remove description there. That way you dont have to republish the service if you have added data or something.
... View more
09-10-2022
05:59 AM
|
1
|
0
|
2280
|
POST
|
Hello, Over the years I have built many script tools to run in Arc Toolbox within ArcMap. These tools have run fine for years with no issue. Several months ago (or maybe longer) I noticed often when I double-click the script to to open/run, there is a new message that Ive never saw before that says ' Click error and warning icons for more information' (see screenshot below). However, there are no errors or warnings (when I click the yellow ribbon it goes away). What is more problematic, some script tools that have lots of parameters now take extremely long to initialize (i.e. just open the form with the parameters) - sometimes as much as 7+ minutes. Most of these tools do not have any special validation defined (in 'Validation' tab), so not sure why it takes so long. Any thoughts/pointers on what may be contributing to this would be greatly appreciated. I am running ArcMap 10.6.1 on Windows 10 (but that hasnt changed for a few years). Thanks Neal
... View more
01-12-2022
08:06 AM
|
0
|
0
|
568
|
POST
|
Thanks Josh - appreciate the suggestion. I posted the lower-tech solution I ended up doing, but Ill look into the Python API since that seems like a more sophisticated/programmatic way to do it
... View more
09-05-2021
07:32 AM
|
0
|
0
|
3257
|
POST
|
Temporary Solution: I tried deleting the features in the web layer and then appending the features with reduced photos (through Arc Pro 'Delete Features' and 'Append' tools), but the attachments did not come through. Note quite the process I had hoped for but solution I used below was pretty simple. So process that worked was: 1. Download AGOL web layer as FGDB 2. Perform picture processing (renaming, resizing, etc.) with local tools 3. Overwrite AGOL web layer by publishing from Arc Pro with processed data
... View more
09-05-2021
07:30 AM
|
0
|
0
|
3258
|
POST
|
Hello, We have been using Arc Collector to collect thousands of features in the field. The layers are hosted on AGOL. Many collected features have one or more photos associated with them (captured through Collector). We have processes/tools to pull down the AGOL data and process the photos (renaming, reducing file size, etc.), but I dont see a clear way to push the processed photos back to AGOL hosted layer. I tried using the 'Remove Attachments' and 'Add Attachments' tools in Arc Pro (similar to what we do for GDBs on our network), but does not seem to work. The only other thing I can think of is to copy AGOL layers down locally, process photos and reset attachments, delete all the features in the hosted layer, and then maybe append the local data into hosted layer. Is there a better way? Any thoughts would be appreciated Thanks Neal
... View more
09-04-2021
06:18 AM
|
0
|
5
|
3303
|
POST
|
Ill check it out - thank you Dan! Ill post if there is an easy change that "fixes" the issue. Definitely usually would produce directly from DEM, but using the NHD High-Resolution datasets which are quite large so thats why was try to extract area I need. Thanks again
... View more
05-28-2021
03:35 AM
|
0
|
0
|
941
|
POST
|
Hello, Ive noticed that when I try to project a flow direction raster (D8 format) it sometimes changes values of the cells and makes the output flow direction raster not work. Im keeping same cell size (but switching units). Im assuming this has something to do when how raster is interpolated (Im using Nearest). Anyone have idea/suggestion to force values to stay the same? Thanks neal
... View more
05-26-2021
04:27 AM
|
0
|
3
|
970
|
POST
|
Thank you Dan and David for your help. What I ended up doing is I think along the lines of what you both mentioned, but maybe a little different. I first created a very simple mini-function in my main script that takes a string parameter. The function then uses 'AddMessage' to return the message to user running script tool and the logfile.write to write same message to a separate text log file. Below is function I created and a snippet of code showing how I used it. Maybe not the most elaborate, but better than having to write each message basically twice. def WriteMsg(strMsg):
arcpy.AddMessage(strMsg)
logfile.write(strMsg + "\n")
return
### Simple snippet below
lstdomains = arcpy.da.ListDomains(inFGDB) #Get list of domains in inFGDB
addmsg="Processing domains in input workspace: {0} and writing as tables in: {1}".format(inFGDB, outFGDB)
WriteMsg(addmsg)
... View more
01-02-2021
12:42 PM
|
3
|
0
|
4499
|
POST
|
Thanks David, in my case it is a number of messages that want to capture.
... View more
01-02-2021
09:01 AM
|
0
|
1
|
4750
|
POST
|
Hello, I have a script tool that I use 'Add Message' to indicate progress during tool execution. I would like to also write everything that I am writing to a text/log file. I know I can do this manually by use a separate standard Python logfile.write process, but wanted to see if anyway to either capture messages at one time Thanks! Neal
... View more
01-02-2021
06:49 AM
|
1
|
5
|
4906
|
POST
|
Hello, I have had challenges querying date field (in a file geodatabase) within Model Builder when passing a date value using inline variable substitution. After some frustration with many attempts, I figured out a very simple and effective solution that I thought I would share. Situation You have a model that gets a date value as input parameter (user entered, from an existing field in feature class, etc.) and store as inline variable (e.g. valDate) You want to query a date field (e.g. 'CompletionDate') in existing feature class again the date passed by the inline variable date. For example you want query 'CompletionDate' > valDate in the 'MakeFeatureLayer' tool (see below) You may try a simple syntax as shown below - THIS WILL NOT WORK Issue Even if the valDate inline variable is defined as a 'Date' is is passed as a string, so you would need to include the reference %valDate% in quotes as such '%valDate%' However, that wouldnt fix issue since the date value passed as string is likely to be in mm/dd/yyyy format (e.g. 07/04/2020) but date format for file geodatabase in SQL query is "date '<date> <time>'" (date '2020-07-04) Solution Use the CAST function in your SQL query so that it "casts" (i.e. converts) string being passed from valDate to a Date value. See example below - THIS SHOULD WORK Hope you find this helpful Neal
... View more
06-28-2020
10:25 AM
|
5
|
4
|
2151
|
Title | Kudos | Posted |
---|---|---|
3 | 09-10-2022 07:03 AM | |
1 | 07-29-2019 05:38 PM | |
1 | 07-29-2019 06:23 PM | |
1 | 06-15-2020 11:58 AM | |
1 | 09-12-2022 04:05 AM |
Online Status |
Offline
|
Date Last Visited |
02-13-2024
11:20 AM
|