Tag Info

Hot answers tagged

6

Try something like this: import arcpy from arcpy import env env.workspace = "E:\Example.gdb" # here you are creating a list of all features from your workspace lst = arcpy.ListFeatureClasses("", "Polyline") # and here you are looping for featureClass in list: arcpy.CreateRandomPoints_Management(


5

If you are using arcpy functions in python to connect to your SDE instance, then you could create an SDE connection file with OS authentication. This SDE file does not store any credentials but uses the credentials of the executing user. Then you can set up the scheduled task to run as a user with the correct DBA credentials. Windows task scheduler will ...


5

Alex Tereshenkov's comment does bring up a good point; you probably should look into using a validation script for this specific case. But to answer your question, you should be passing the path (or name) of the feature class, along with an optional wild card and field type to arcpy.ListFields; see the ESRI docs for ListField. That method actually returns ...


4

You can create unique values but based on which polygon the point resides in. Add a unique attribute which is at least 10 times larger than the amount of points to your polygons, and the join this value to your points. Like in your example, the upper polygon would have 100. Join to your points and create unique values that is something like 101 and 102. ...


3

As you have discovered, starting with ArcGIS 10.0, Survey Analyst has been deprecated. The functions were split - Cadastral editor was integrated into the two higher license levels, while the Survey Editor functions are no longer supported. However, another extension called Data Interoperability may allow you to read and import your file, among others. It ...


2

You should be able to use the Copy Features Tool on the layer with your selection, as long as the out_feature_class parameter is set to the path on disk of where you want the shapefile to be written out it should just work.


2

The standard ESRI tech support response probably would be to reset your application profile. They usually recommend renaming the ESRI folder in your user application data folder. That is effective in letting you know if the problem is in your templates or registry settings, but you do lose all customizations. So if it works and you don't want to redo your ...


2

I would simply set my workspace (arcpy.env.workspace = "NAME OF GDB HERE") and then list the Line feature classes into a python list (fcs = arcpy.ListFeatureClasses("","Polyline")). Then you can loop through them. So same as other answer provided but with 1 minor difference - incorporating the Polyline option: import arcpy arcpy.env.workspace = ...


2

This is more a Python logic problem than a GIS problem, I'd recommend asking questions like these on Stack Overflow. Try this: import arcpy arcpy.env.overwriteOutput = 1 arcpy.env.workspace = "C:\\salzburg.gdb" sbgRivers = "sbg_rivers" buff_name = raw_input("Please insert a file name:") while arcpy.Exists(buff_name): for buffer_size in ...


2

Focal Statistics and Raster Calculator are fairly different tools. First, you need to have a raster of cells that can be used to determined whether it's developed -- for a simple example, "house" (1) or "not house" (0). Run Focal Statistics on this data. Use a rectangular neighborhood (3 by 3 cells), statistics type SUM. I think this may be what you ...


2

If you are asking if a shapefile that is created with QGIS in a Mac environment will open with ESRI in a Windows environment, the answer is yes. A shapefile is a file format. It will respond to software the same, regardless of operating system. Think of it like a JPEG. You can make JPEGs on a Mac, and view them in Windows, or Linux.


1

buff_name = "name_to_test_first" # or =raw_input("Please enter a new data set name") while arcpy.Exists(buff_name + "*"): # I use a wild card because the new FC include the buffer size, so this is the name you don't want to exist buff_name=raw_input("Please enter a new data set name") #don"t forget to indent #else: this else has nothing to do ...


1

The documentation only makes mention of being able to use shape.area on Python expressions. You will need to use a Python expression to do this. I would very strongly recommend reinstalling ArcGIS. Python not working is indicative of a corrupt installation of ArcGIS, and working around it will not alleviate the problem in other areas.


1

This is how I would do it: Convert your line to a raster (Polyline to Raster) Convert the raster to points (Raster to Point) Add Z value from the raster to the points (Extract Values to Points). A new field named RASTERVALU with the raster Z value is added. Turn the points into a feature layer and select the point with the minimum Z field value using for ...



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