Hot answers tagged validation
4
When running something like this in a Toolbox Tool, you indeed want to use Tool Validation. For example:
class ToolValidator:
"""Class for validating a tool's parameter values and controlling
the behavior of the tool's dialog."""
def __init__(self):
"""Setup arcpy and the list of tool parameters."""
import arcpy
self.params = ...
3
There isn't much point in iterating over a list of tables if the number of them is small and you know exactly the names and locations of each one -- instead, just specify their paths in full:
e.g.:
soil_table = r"C:\BASE_TABLES.gdb\SOIL_TYPE"
veg_table = r"C:\BASE_TABLES.gdb\VEG_TYPE"
soil_fc = r"C:\TEST_GDB.gdb\SOIL_FEATURECLASS"
If the workspaces can ...
3
This should be possible but your usage of ListFeatureClasses and SearchCursor is incorrect:
ListFeatureClasses requires you to set arcpy.env.workspace first. Its arguments are optional, but the first is a wildcard, not a workspace.
SearchCursor's first argument is a table or feature class, not a workspace.
That being said, I wouldn't really recommend ...
2
I have just submitted an ArcGIS Idea for Validation of Hierarchical Fields but since your comment says that your requirement is now for Python I thought I would put together some code showing how to do this using dictionaries.
The CityProvinceLookup table has two fields CITY and PROVINCE with a row for each valid combination.
The ProvinceCountryLookup ...
2
Without wanting to sound harsh, I am surprised that a GIS professional has not heard of dangling nodes as this was GIS 101 for me. I presume you also know about 'undershoots' and 'overshoots', 'bow-ties or knots', 'switchbacks' and 'spaghetti digitizing'.
Dangles are a big issue because they are bad topology and bad topology means your data won't perform ...
2
Make sure your data is clean, remove points that are duplicates, very small interior angles, overlaps, nonsnapped geometry which is done in oracle through fatal checks and preprocessing scripts.
Try 32 SDO_UTIL Package (Utility) which " Converts a geography markup language (GML 3.1.1) fragment to a Spatial geometry " then try running preprocessiong, error ...
Only top voted, non community-wiki answers of a minimum length are eligible

