|
POST
|
This made for a pretty interesting project this morning. I think I finally may be on to something lol. The following python code invokes the GDAL/OGR methods (click here if you don't have these installed). Researching File GDB schema breakdown and with Luke Webb's confirmation above, we know we're looking for the system table called "TerrainDataset_1_MRFC" - or realistically "*MRFC", which tells us that the terrain dataset has pyramids. Using this search parameter, I loop through all the objects in the File GDB and find this table, I then extract its name and append it to a list. You can now use the names in this list to compare to your known dataset names to see if their pyramids have been created or not (ie: if the name shows up in the list, your pyramids "SHOULD" be good, or at the very least created at one time. ** I'm not sure if this technique will return pyramid tables from other rasters. I would set this up so that it searches specifically for the datasets you are looking for and not a blanket search on all datasets like I did. *** # standard imports
import sys
# import OGR
from osgeo import ogr
# use OGR specific exceptions
ogr.UseExceptions()
# get the driver
driver = ogr.GetDriverByName("OpenFileGDB")
# opening the FileGDB
gdb_path = r"D:\terrain\terrain.gdb"
try:
gdb = driver.Open(gdb_path, 0)
except Exception, e:
print e
sys.exit()
# list to store layers'names
featsClassList = []
# parsing layers by index
for featsClass_idx in range(gdb.GetLayerCount()):
featsClass = gdb.GetLayerByIndex(featsClass_idx)
terrainFCs = featsClass.GetName()
suffix = "MRFC"
if terrainFCs.endswith(suffix):
featsClassList.append(terrainFCs.split('_', 1)[0])
# sorting
featsClassList.sort()
# printing
print "The following Datasets have pyramids. Catch these results and compare to your list:"
for featsClass in featsClassList:
print featsClass
# clean close
del gdb
... View more
05-28-2015
08:51 AM
|
1
|
0
|
1705
|
|
POST
|
Hi Rami, Could you please edit your question and reformat your code with the advanced editor? It will make it easier for everyone to read and help troubleshoot. See Formatting Your Code In Geonet For The Visual Learner Thanks! Todd
... View more
05-28-2015
04:58 AM
|
0
|
1
|
639
|
|
POST
|
Anna, if you could please move the location of your question out of the GeoNet help discussion area - it's meant for discussions on how to use the GeoNet site itself and not GIS-related questions. If a moderator catches it before you see this - just ignore!
... View more
05-28-2015
04:52 AM
|
0
|
1
|
4975
|
|
POST
|
On further reading, you could also try out the Feature Compare tool, which will run a comparison between 2 feature classes or layers found here. You have the option to set what it compares (such as geometry, schema, attributes, etc), but you're obviously looking at the geometry option. This tool is probably quicker and less 'dirty' than merging your data to run as above. Todd
... View more
05-28-2015
04:48 AM
|
2
|
0
|
778
|
|
POST
|
Hi Anna, you're on the right track. Detect Feature Changes is specifically set up for linear features. The rest of the Data Management/Data Comparison toolset has other tools that will compare other data types. ArcGIS Help - Data Comparison Toolset Specifically, within the Data Comparison toolset, you will find the Feature Compare tool, which runs against feature classes or layers. ArcGIS Help - Feature Compare Hope this helps! Todd
... View more
05-28-2015
04:41 AM
|
1
|
2
|
4975
|
|
POST
|
Hi John, I did a lot of research on this last night as your question really intrigued me. Something as simple as a click in ArcMap should have a similar option in arcpy to access that information. Like you, I imagine, I found absolutely nothing that led me to believe this is possible in arcpy. I'm suggesting a long shot here - and have not tested this theory to see if this actually works. It appears that the pyramid info is stored in a separate system table within the geodatabase. This table obviously isn't visible at the GIS level, but if you could send a SQL query through to the database and query whether the table or a specific entity in the table exists (I know, not being very helpful here) then you might be able to use that return as a check prior to running any further in your workflow. You might need to do some digging in your DBMS back-end to figure out what table/object is created with pyramids as I don't have the specific answer for this, just that when I researched it led me to this fact. There should be some python modules out there that allow you to access your geodatabase's system tables and query them. I realize this isn't an answer, but hopefully it leads you to one. Cheers, Todd
... View more
05-28-2015
04:27 AM
|
1
|
4
|
2836
|
|
POST
|
Hi Sandra, Is a standard SQL query across two tables not working? Ex: SELECT house.address, house.owner, pet.petname, pet.type FROM house JOIN pet ON house.ID=pet.ID WHERE pet.type='dog'
... View more
05-27-2015
10:02 AM
|
1
|
1
|
1854
|
|
POST
|
Hi Cathina, You can do a quick merge and use the "Find Identical (Data Management)" tool to search for identical geometries (within set tolerance) by pointing it at the [shape] fields. There is also a "Delete Identical" tool. More info: ArcGIS Help (10.2, 10.2.1, and 10.2.2) Cheers, Todd
... View more
05-27-2015
09:53 AM
|
2
|
1
|
778
|
|
POST
|
Hi Fabiano, From what I've researched, it's not possible. You have to fix one error before you can list the next. Here is the quote from ESRI's online help: Validation is a short-circuiting process, meaning that the validate process stops if one of the checks fails. For example, if a feature is found to violate a connectivity rule, the validation of the feature stops, and any relationship rules will not be checked until the connectivity rule violation is corrected and the feature is validated again. Cheers, Todd
... View more
05-27-2015
09:42 AM
|
0
|
0
|
680
|
|
POST
|
Hi Justin, I'll try the simplest approach here first, since I can't see all your code and what specifically might be wrong line by line. If you had a previously working tool that no longer works, obviously start with the new code. That being said, it doesn't sound like you're getting a geoprocessing error. The "Invalid Tool" code is usually thrown when Arc can't see the location of your tool within a model, or your model within a toolbox. Can you double check all your references to paths, especially since your path locations may be different when you're looking at things from the server side vs your client side. This would be my first step - hopefully it's that simple for you. Cheers, Todd
... View more
05-25-2015
09:23 AM
|
0
|
1
|
1745
|
|
POST
|
Hi folks, having an issue that someone can hopefully help me out with: I can register SDE geodatabases just fine, the problem I have is with registering folders. I have a network storage device; it has its own IP and is a share that is accessible by the server and client machines (let's say 192.168.10.21/geodata). Clients can access this share via the UNC or by mapping the drive to their own computer (we'll say the Q:\ drive). I created one registration via the UNC address and it works fine (doesn't warn that data will be copied to the server), but I get a medium warning that data is being referenced by UNC (don't know if this is bad?). I've also created a second registration with the following settings: Publishers Path: Q:\ Publisher Folder Hostname: 192.168.10.21 Server Folder Path (unchecked): \\192.168.10.21\geodata It creates the registration and validates just fine, but when I analyze to publish, I still get a warning that my data is not registered and that it will be copied to the server. Any ideas? This is server 10.3.1, but I had the same issues in 10.2.2. Thanks, Todd
... View more
05-25-2015
09:07 AM
|
0
|
2
|
7377
|
|
POST
|
So I noticed that the XY data in your table are exactly the same spatial location as the points shapefile you gave me. If this is what you're trying to achieve, it's pretty easy: 1. Create XY events from your table (I used the spatial reference [projection] that your point shapefile was using) 2. Export the XY events to a shapefile, and you will have a points shapefile that has all the information that was included with the original table. You should now have a properly projected shapefile with all the data you wanted in it in the first place.
... View more
05-21-2015
10:20 AM
|
2
|
3
|
3545
|
|
POST
|
I think Sephe Fox and I are both a little fuzzy on what exactly you're trying to accomplish... it seems like you're trying to do so much to fix one little problem. Is there any chance you'd be willing to share your shapefile and table with us so that we could take a look at it? As long as it's not sensitive data or anything like that.
... View more
05-21-2015
09:37 AM
|
1
|
1
|
1109
|
|
POST
|
When you try to join the results from your sub-model to the Join Field tool as a parameter, does it not ask you what input parameter you would like to use that for? Ex: join your shapefile output to the Join Field tool, set as parameter and click on Input Table. Do the same for your output table, set as input parameter for the tool, and click on Table to Join.
... View more
05-21-2015
08:18 AM
|
2
|
4
|
894
|
|
POST
|
So if I read you correctly, you have made sure that you have: 1. A feature class that has a field called FID_1 that has unique numbers from 0 -> whatever. 2. A table that has a field called FID_2 that has unique numbers from 0 -> whatever. and they're not showing up as options on the Join Field tool. What happens when you try to join the outputs from the 2 sub-models to the Join Field tool? Do they populate the parameters for the tool? Are the fields different value types (ie one is a string, one is a int/float)?
... View more
05-21-2015
07:28 AM
|
2
|
7
|
2436
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-28-2015 11:52 AM | |
| 1 | 05-29-2015 07:32 AM | |
| 1 | 05-19-2015 05:16 AM | |
| 1 | 06-11-2015 10:04 AM | |
| 1 | 05-27-2015 10:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|