|
POST
|
Per your question on how to run this on multiple file extensions, the simplest solution is just to call the locate function multiple times. Such as: for ext in ('*.txt', '*.thn', '*.csv'):
# This will run three times first returning all
# the TXT files, then THN,and finally CSV files
filelist = locate(ext, r'D:\path')
for fp in filelist:
# Do what you need to with this file
# You can also use the variable 'ext' here to
# process files differently base upon the 'ext'
... View more
03-07-2021
05:59 AM
|
0
|
0
|
887
|
|
POST
|
Sorry, I left the "with" out of the statement when I cut and pasted. I have corrected my previous post.
... View more
03-06-2021
08:43 AM
|
0
|
0
|
907
|
|
POST
|
Mick, if you are referencing the filelist from Dave or my examples you iterate through the list using: for fp in filelist:
# fp is the full path and filename for each item in the filelist
with open(fp,"r") as f:
# do what you need here with the file data
... View more
03-06-2021
05:11 AM
|
1
|
3
|
3063
|
|
POST
|
Mick, Are you trying to crawl through a folder looking for files and their path? I use the following to reclusively look for a particular file type in a folder and subfolders. The function call below returns a list containing the folder and filename for all "txt" files in a directory and its subdirectors. import os, fnmatch
def locate(pattern, root=os.curdir):
for folder, subs, files in os.walk(root):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(folder, filename)
filelist = locate('*.txt', r'D:\path')
... View more
03-06-2021
04:58 AM
|
0
|
6
|
3074
|
|
POST
|
No fair David, you can type faster than I can. One other note. Make sure you use a Python raw string for your path. This will treat the backslash (\) as a literal character and not as an escape character. David has included this in is example by using the lower case (r) in front of his path "myfolder" string. myfolder = r'D:\Downloads'
... View more
03-06-2021
04:39 AM
|
1
|
0
|
944
|
|
POST
|
Still thinking about this one and I still think it is a path or permissions issue. Does this occur if you just open the mosaic and not the image service? Try the following: 1) Use the Identify tool, set the "Identify from:" to the imagery and click on the checkerboard. 2) In the dialog select the image, right click on the raster and select "View Raster" Does it display on the Preview tab? Go to the Functions Tab, right click on the image and select Properties... You may get an Error message. Check the path and permissions for the error location. If you do not get an error review the properties data. If you are able post the data.
... View more
03-04-2021
03:58 PM
|
0
|
0
|
4715
|
|
POST
|
Todd, Typically when you see a checkerboard from a image service it is the system cannot resolve the path to the overview or imagery files. The concerning part is you state this issue occurs periodically. For clarification, does it occur on some systems or for some users and not others? Does it occur sometimes on the same system with the same user? Since you recently changed your enterprise storage, did paths or permissions change as well? I would check to: Make sure any path changes were fully updated. Make sure a UNC path was utilized and not a mapped drive that could be different per user/system. Make sure the problem user/system has appropriate permissions to the enterprise storage share or shares using the UNC path. I would also make sure the image service is not timing-out You are referencing overview tiles which would be indicative of a mosaic dataset, which you also tagged. However, unless you are running an ArcGIS Image Server you cannot publish mosaic datasets as an image service. ArcGIS Image Server is typically not part of an ArcGIS Enterprise single stack deployment. Are you referencing cache tiles that are optionally stored as part of a image service? If so, you may want to update the cache for the problem images. Some systems may have a local cache of the tiles and be why they are working. ArcGIS Image Server is a licensing role of ArcGIS Server that extends the capability of serving raster data. Specifically, it allows you to serve a mosaic dataset or a raster layer containing a mosaic function. When you are serving an image service, there are two license scenarios: Without ArcGIS Image Server, you can still serve a raster dataset or raster dataset layer. With ArcGIS Image Server, you can serve a mosaic dataset or mosaic dataset layer. https://enterprise.arcgis.com/en/server/latest/publish-services/windows/key-concepts-for-image-services.htm If you are running a ArcGIS Image Server as part of your deployment with a mosaic dataset. Have you checked the paths in the mosaic dataset to make sure any changes to your storage paths were updated? You can use Repair Mosaic Dataset Paths Tool in desktop or Repair Mosaic Dataset Paths (Data Management) in Pro to inspect and make changes to the paths. Again, make sure you are using UNC paths. One last option and depending upon the size of the imagery, you may want to consider deleting the image service and republishing.
... View more
03-03-2021
05:41 PM
|
1
|
2
|
4736
|
|
POST
|
I recently noted that user info does not always appear when hovering over their name in a post. I have typically noted this after posting a reply or editing a reply.
... View more
03-03-2021
02:38 PM
|
0
|
2
|
1313
|
|
POST
|
I have not worked with this in Pro Attribute Rules but the Concatenate function in Arcade is Concatenate( values, separator?, format? ). Try using the following in your return: Concatenate(['wMET', nextsequencevalue("wMeterSeq")], '', '000')
... View more
03-03-2021
02:23 PM
|
3
|
1
|
5566
|
|
POST
|
Do not use the collect feature button. Instead, if you tap and hold on the map a magnifier cross-hair will appear. Position your finger over the location to be collected and release. This drops a pin with the option to "Collect Here". Select the feature type to collect and press "Submit". The map stays where you are working. Hope I understood your question correctly. Note, the magnifier is showing the area under your finger tip and this is where the pin will be dropped.
... View more
03-03-2021
01:25 PM
|
2
|
3
|
6673
|
|
POST
|
Door Number Two. Exit any open GIS Session that you have open. In File Explorer, open the GDB folder on the removable drive, filter by file type and look for "LOCK File" the file will end with "sr.lock". If you unplugged the drive before ArcGIS was closed you may have orphaned lock files still on the drive. These can be deleted but make sure you have a backup of the data. Door Number Three. If the above is not the issue. In ArcCatalog , Create a New GDB on your system. Find the problematic GDB and right-click. Select Export > To Geodatabase (Multiple) Set the Output Geodatabase to the new one you just created and Click OK. Try to open the new GDB on your system
... View more
03-03-2021
09:29 AM
|
1
|
1
|
5457
|
|
POST
|
Vera, Just a guess but I have seen similar before from the following: From the system you are having the issue with, open File Explorer to the external drive, right-click the mxd, gdb or folder containing the information and select Properties. Look at the bottom of the dialog box under the General Tab to see if there is a security warning the files or folder is blocked because it is from another computer. Just check the "Unblock" check-box and click Apply to clear. See screen shot below.
... View more
03-03-2021
08:36 AM
|
1
|
1
|
5463
|
|
POST
|
Since you are on SDE you have available a large range of SQL commands. Try the following for the WHERE clause in your Select by Attribute. This is not mine and is available from the blog Extracting numbers with SQL Server. The 50 in the statement is just to limit the length of the string being processed. If your field is larger than 50 characters, set it to the max size of the field you are checking against or you can replace it with LEN(TESTNAME). However, the statement is cumbersome already. Please replace "TESTNAME" in all four (4) locations with the field you are using. The "BETWEEN 1 AND 4000" is from your example of "< 4000" and can be changed to what ever you need. Setting it to "= 0" will return records without numbers. (SELECT LEFT(SUBSTRING(TESTNAME, PATINDEX('%[0-9]%', TESTNAME), 50), PATINDEX('%[^0-9]%',
SUBSTRING(TESTNAME, PATINDEX('%[0-9]%', TESTNAME), 50) + 'X') -1)) BETWEEN 1 AND 4000 One of the reasons it is so complex is is looks for a number anywhere in the string. Also, It will only find the first number in a string. "500-ADAM-600" will only be selected for 500 and not 600. Tested on a MS_SQL SDE database using ArcGIS 10.8.1 Select by Attribute.
... View more
03-02-2021
10:28 AM
|
1
|
0
|
4589
|
|
POST
|
I had the feeling you did not want to add additional fields. What version of ArcGIS are you using and what level of licensing? What is the data source, i.e. shapefile, GDB, Enterprise DB, etc.? Select by Attribute only has a limited subset of SQL functions but there are other tools that may work or there is the option to script a select. Are these acceptable options?
... View more
03-02-2021
05:17 AM
|
1
|
4
|
4603
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 1 | 09-16-2019 05:49 PM | |
| 1 | 06-11-2025 03:32 PM | |
| 1 | 12-26-2023 09:15 AM | |
| 1 | 12-29-2023 10:06 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|