POST
|
There isn't an actual tool; however, python can access the workspace properties in order to examine the domains associated with that workspace. Check out this link on the workspace properties. The domain property will automatically make a list object and you can use a For loop to sort through those and do whatever you need to do to the domains, such as running each domain through the Domain to Table tool. I hope that helps!
... View more
12-02-2011
03:16 AM
|
1
|
0
|
1330
|
POST
|
It looks like how you have your code set up right now you are looping through the points and making the source point have many different points. But, the Particle Tracker help doc says that the source point is only one coordinate location, the start of the track. The OutTrack file also needs to be an ASCII text file. What it sounds like you need to do is take those xy coordinates that you get from for loop and write them into the text file which you can then use as your track. Explanation of reading and writing to a file. If you have that ASCII file set up already but want the track to start at the point you've extracted from the shapefile in that For loop, then you will want to indent the checkout and particletrack so that it hits each point to run the track. Hope this helps!
... View more
11-21-2011
04:18 AM
|
0
|
0
|
377
|
POST
|
So you to give the block number ID to each of the road feature classes you have? Does Analysis Roads already have a field called STFID? If you already have this field you would be better off to use an update cursor to update the values of the STFID field. Do each of your blk00 contain only one feature or multiple? Here is a rough example using the Update Cursor instead. I don't think this will work exactly with the select by location, but it should help show you want you may need to modify to use the Update Cursor instead. Have a look through the update cursor info http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/UpdateCursor/000v0000003m000000/ import arcpy
#Set geoprocessing environment
arcpy.env.workspace = "H:\Dr. Hines\New File Geodatabase.gdb"
arcpy.env.overwriteOutput = True
#Create list of all blocks
fcList = arcpy.ListFeatureClasses("*blk00")
#Create loop
for fc in fcList:
selected = arcpy.SelectLayerByLocation_management("Analysis Roads","HAVE_THEIR_CENTER_IN", fc)
highway = "Analysis Roads"
rows = arcpy.UpdateCursor(higway)
for row in rows:
if row is in selected:
row.STFID = fc.STFID #this is assuming your feature classes have a STFID field too, you can change this to the right field name.
rows.updateRow(row) del row del rows
... View more
11-18-2011
12:15 PM
|
0
|
0
|
612
|
POST
|
You may want to try resetting your Esri application data and registry keys. Please follow these steps to do so: Please note: Renaming the Application data will result in loss of folder connections, SDE connections, and toolbar locations since it rebuilds the template back to the out of the box feel. Also, editing registry entries can cause issues on your computer. Please be careful when making these changes. A) Rename ESRI Application Data folder. - Close all ArcCatalog, ArcMap applications. - Browse to the following directory: C:\Documents and Settings\<user profile>\Application Data (you may have to turn on hidden files). In Windows 7/Vista: C:\Users\Username\Applications Data\Roaming(you may have to turn on hidden files from the control panel, go to Appearance and Personalization/Folder Options/Show hidden files and folders) - Rename ESRI folder to ESRI_OLD. B) Rename the ESRI folder in Registry. - Start Menu --> Run --> type "regedit" - Expand HKEY_CURRENT_USER folder - Expand Software folder within HKEY_CURRENT_USER - Rename the ESRI folder to ESRI_OLD The other good thing to check is if someone else in your company can log onto your machine with their username and password and reproduce the problem. If they also have blank tools, there is probably some kind of conflict preventing the tools from working properly. If they can use the tools, then your windows user profile has become corrupt to the install of ArcGIS and a new profile is needed for functionality to return.
... View more
11-18-2011
08:46 AM
|
1
|
0
|
2660
|
POST
|
You'll probably want to start out with a Search Cursor and for loop to go through each of your features. Check out this link: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/SearchCursor/000v00000039000000/ Next, in the for look you would want to do a Select by Attributes on the FID of the value that it is currently hitting in the list. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000071000000 After you have selected the feature by its FID, use the feature class to feature class tool to export it. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000020000000 I hope this helps!
... View more
11-17-2011
03:30 AM
|
0
|
0
|
306
|
POST
|
Two things to check for the MOMA tool: 1. Is this an Esri Grid? 2. Is your Grid in a folder and not in a geodatabase? A bug was submitted similar to your issue as MOMA only supports Esri Grids and will not work if the raster is in a geodatabase. Place the Grid in a folder to run the tool. See this link for info on the bug http://support.esri.com/en/bugs/nimbus/TklNMDU2ODIy Also, check out the MOMA help if you haven't already, http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Multi_Output_Map_Algebra
... View more
11-16-2011
04:33 AM
|
0
|
0
|
655
|
POST
|
There is a built in tool that will do this for you at any license level in version 10. It's called the Feature Compare tool. This sounds exactly what you described wanting. For more information, check out the tool's description found here.
... View more
10-04-2011
04:20 AM
|
0
|
0
|
1537
|
POST
|
If you want some GIS and python practice, we have some free and $32 web courses on our training website that you can take that cover some of the basics. See this link for the full search I did: http://training.esri.com/gateway/index.cfm?fa=search.results&searchterm=python
... View more
10-04-2011
04:09 AM
|
0
|
0
|
411
|
POST
|
Hi Mike, I think you have one tiny thing wrong with the script, it's this line: mxd2.saveACopy(r"Z:\ESRI\Figure_Sourcing\Figures\TestFigs\IOR\MapSourcingTest\Test2.mxd") Change this line to: mxd.saveACopy(r"Z:\ESRI\Figure_Sourcing\Figures\TestFigs\IOR\MapSourcingTest\Test2.mxd") Remember you are still working on the mxd variable and there is no mxd2 in what you have setup here. I think this is the problem. I found this out by taking it out the Try/Except. That's the only bad part about Try/Except, you miss out on those exception messages. You may want to add the getmessage there to help future troubleshooting. Once I fixed that line, I had no problem running your script through the Try/Except and getting it to work. I hope that helps! :cool:
... View more
09-26-2011
12:11 PM
|
0
|
0
|
729
|
POST
|
I think it's the "D:/GIS/Data/Aug_Files" in this line of code that is causing the problem. arcpy.FeatureClassToGeodatabase_conversion("D:/GIS/Data/Aug_Files", "D:/GIS/PBCO2011/Planning.gdb") Mody is right that you need to put your list of elements in this spot. Another way you can do it is like this: import arcpy
from arcpy import env
env.workspace = "D:/GIS/Data/Aug_Files"
fcs = arcpy.ListFeatureClasses("*")
for fc in fcs:
arcpy.FeatureClassToGeodatabase_conversion(fc, "D:/GIS/PBCO2011/Planning.gdb")
The listFeatureClasses method link in the Help also has a sample of moving shapefiles into a geodatabase using the copyFeatures_management tool. See this link for more information on it: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListFeatureClasses/000v0000001n000000/
... View more
09-01-2011
05:34 AM
|
0
|
0
|
799
|
POST
|
In 10.1, there are plans to add a few new symbology classes to the Mapping module. If you have access to the 10.1 beta community, you can look in the beta resources for GraduatedColorsSymbology to see this new class's properties. As of now, it looks like it does have a classBreakDescriptions property that has read/write access to allow you to form a list of values to break on. There are a couple other new symbology classes for python such as RasterClassifiedSymbology, UniqueValuesSymbology, and graduatedSymbolsSymbology in addition to GraduatedColorsSymbology. Please note: this is currently listed in the beta resources, but things can change between the beta release and the final release.
... View more
08-31-2011
05:10 AM
|
0
|
0
|
443
|
POST
|
Great! Glad to hear that worked good for you! :cool:
... View more
08-23-2011
01:29 PM
|
0
|
0
|
5934
|
POST
|
Make sure in this line you use the full path the the map document: m = arcpy.mapping.MapDocument("test3.mxd")
For example: m = arcpy.mapping.MapDocument(r"C:\Data\MapDocs\test3.mxd")
The way you have it right now, it is unsure of where to find that document.
... View more
08-23-2011
01:28 PM
|
0
|
0
|
618
|
POST
|
This can be done by using the Method of zoomToSelectedFeatures () for data frames or Layer.getSelectedExtent for layers. For more information, see this link on the data frame method: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/ and this link for more on the layer method: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/ There is a short sample and explanations that should help give you an idea of how each works.
... View more
08-22-2011
04:29 AM
|
0
|
0
|
618
|
POST
|
You can use the Add XY Coordinates tool to expose the xy coordinates of your point data. See this link http://http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000032000000.htm You should be able to use this in a model. However, before you do this you would need to re-project the data into a geographic coordinate system like WGS1984 or NAD1983 to get the values in decimal degrees. You would run the tool on this new feature class and that is where the information would be put. You can then do a join on data that is in the projected coordinate system to get its long/lats in decimal degrees. Also in the model, you can also use Add Field then the Calculate Field tools. In the Calculate Field tool, use the following python expression. def find(shape):
point = shape.getPart(0)
return point.X find(!Shape!) (sub point.Y to get the Y coordinates) This will however use the coordinate system of the data so again you may need to re-project the data before you use the Calculate Field tool. Again, you can join the data back to your projected coordinate dataset.
... View more
08-20-2011
10:39 AM
|
0
|
0
|
5934
|
Title | Kudos | Posted |
---|---|---|
1 | 12-18-2017 01:35 PM | |
1 | 12-18-2017 10:57 AM | |
1 | 11-18-2011 08:46 AM | |
1 | 12-27-2019 01:07 PM | |
1 | 09-14-2015 10:24 AM |
Online Status |
Offline
|
Date Last Visited |
08-08-2024
03:45 PM
|