Tag Info

Hot answers tagged

5

It's not working because your not calling it :) Try something like this def isValid(inPath): if arcpy.Exists(inPath): print 'Exists' else: print ' Does NOT exist' def main(): shpFile = raw_input("Enter a Map Document path: ") # User inputs a shapefile shpFile = shpFile.replace("\\","/") #You shouldn't need to do this ...


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

This may vary depending on where in the US you are, but typically as part of the development process addresses are assigned by the city/county assessor around the time the plat is recorded. I don't think it's so much a case of 'validating' as getting updated data, just like your geocoding vendor. It sounds like the post office has more recently updated their ...


3

Unfortunately no. Validate Features is a really simple tool for finding out if you have any unvalid features in your selection. There is no way to tell why these features are invalid in batch mode. What you can get out-of-the-box is to select all your features in the editing session > Editor > Validate Features. You will get only unvalid features in the ...


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

The snap option in v.in.ogr and v.clean in GRASS are basically the right way to go. But looking at the file you published, I'm afraid that you can't fix all problems without manual editing. My tip: Get familiar with the GRASS digitizer and invest a day or two to build a topological correct data layer.


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 ...


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

In Arc you can build a geometric network and then check at the error table to look for bugs (for this you have to first delete the topology, and also the remove the roundabout that also produce a geometric network error). The errors flagged up are common problems regardless of which GIS you use: Features that have empty geometry, features that contain ...


1

From my experience. Use only Linestring type of lines, build long as possible lines, require that every line has least 1 point shared with others, do not allow 0 length lines, require lines to be OGC Valid (no self intersecting etc). If you have events on lines (linear referencing) store gps point too, because there will be someone who doesn't understand ...


1

One possible WKT validator can be PostGIS or a whatever spatial DBMS you like. For instance: SELECT ST_GeomFromText('POINT(-71.064544 42.28787)'); is executed successfully, because POINT(-71.064544 42.28787) is a valid WKT representation. Instead: SELECT ST_GeomFromText('POINT(-71.064544, 42.28787)'); returns: ERROR: parse error - invalid geometry ...


1

It sounds like you want to take the results of the line [str(val) for val in sorted(set(row.getValue(col) for row in arcpy.SearchCursor(fc, None, None, col)))] and assign it to both parameter 2 and parameter 3. To do that, you could just assign the result of the above line to a variable, and then set the filter.list property of both parameters to that ...


1

You are on the right track. You can set preconditions in Arc Model Builder to control the order in which parts of the model run. You can either set them by right-clicking the tool and selecting Precondition from the pop-up menu or by using the connect tool (see here). You can also use Booleans and Positive integers to act as preconditions (possibly set by ...


1

thought some people might find this valuable. ESRI was gracious enough to help work through this and find an alternate to the validation used in the blog post which does not require and Advanced license. While I certainly had to figure out some additional items, I cannot take credit for the validation code. But, the ends justify the means and this qualifies ...


1

So, I forgot to put "gml:" before multigeometry and multimember. My mistakes have decreased. The .xsd is valid but not yet the gml. I also changed multimember into multimembers. For thr validation error gml, the error is still the same as before. I still can not generate the sd. Arcgis server in order to allow the generation of a wfs service. ...



Only top voted, non community-wiki answers of a minimum length are eligible