|
POST
|
You are using da UpdateCursor for the 3rd table. So, modify the assignment code by row[index] = value: for row in cursor:
row[0] = x.S_RANK + y.G_RANK
row[1] = x.DESCRIPTION + " + " + y.DESCRIPTION
cursor.updateRow(row)
... View more
06-14-2012
11:57 PM
|
0
|
0
|
1506
|
|
POST
|
Just need a clarification: Say the area of a tract is 100 unit. In that tract residentical area is 20, commercial is 30 and institutional is 20. Together they occupy 70% of the tract area. The rest 30 unit do not belong to any of the categories. How do you want your resulting values to be? Such as, for residential you want percentage against the total of the landuses (20/70 * 100)? or against the total area of the tract (20/100*100)?
... View more
06-14-2012
10:09 PM
|
0
|
0
|
809
|
|
POST
|
So, all your datasets are in table format (non-spatial) except the polygon shapefile, right? Could you please elaborate on the schemas (fields) of the table and the shapefile?
... View more
06-14-2012
03:03 PM
|
0
|
0
|
672
|
|
POST
|
I was trying to use python for select by attribute using variables from user input. This thread is about 'zoom to selected feature' issue. You have introduced a very different question in it. People who are not interested about 'zoom to selected' will not check this thread out and will not see your question. If you can, please start a new thread with your question. That will help other users with similar problem also.
... View more
06-14-2012
02:54 PM
|
0
|
0
|
1775
|
|
POST
|
The XML file only stores the metadata of a shapefile. For example, the schema (fields and their types) of the table. Features are not stored in the XML file. You can read through this help topic to find more information: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002t0000000m000000 I found this table important (note the 3rd column - yes means the file is required): [TABLE="class: table"].shp The main file that stores the feature geometry. No attributes are stored in this file�??only geometry. Yes .shx A companion file to the .shp that stores the position of individual feature IDs in the .shp file. Yes .dbf The dBASE table that stores the attribute information of features. Yes .sbn and .sbx Files that store the spatial index of the features. No .atx Created for each dBASE attribute index created in ArcCatalog. No .ixs and .mxs Geocoding index for read-write shapefiles. No .prj The file that stores the coordinate system information. No .xml Metadata for ArcGIS; stores information about the shapefile. No [/TABLE] In short, you may not create the shapefile just from one xml file 😞 You can try exploring the Schematics tools.
... View more
06-14-2012
09:13 AM
|
0
|
0
|
7329
|
|
POST
|
Calculate Field is available on 9.3 and the code should work on 9.3 as well. Are you getting any error? Here is the doc for that version of ArcGIS: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Calculate_Field_(Data_Management)
... View more
06-13-2012
02:11 PM
|
0
|
0
|
1874
|
|
POST
|
All I get back is "A Message from popup box" Which is the string going in. Nothing ever pops up. Nothing will pop up - the tool that you are using is the dialog and substitutes the pop-up. You use it to get a string value from the user. So, in your case, the user will type the name of the report (a string), the script behind the code will capture the string and do whatever you want the script to do. The advantage is that you can chain this dialog (i.e., the tool) in ModelBuilder and any other Python or .Net or Java application. You can drag-drop this tool to an ArcMap toolbar - it will work as a button. Why isn't Tkinter supported? I think it should be. The reason is TkInter's event loop does not work with ArcMap. You can read through these forum threads where some users are able to use TkInter. http://forums.arcgis.com/threads/38292-Making-a-GUI-app?highlight=TkInter http://forums.arcgis.com/threads/58207-ArcPy-and-Tkinter?highlight=TkInter http://forums.arcgis.com/threads/32040-Tkinter-GUI-Disconnect-with-ArcGIS-Script-Interface?highlight=TkInter
... View more
06-13-2012
01:53 PM
|
0
|
0
|
3918
|
|
POST
|
Glad to know 🙂 If that solves your question, could you mark the thread as 'Answered'?
... View more
06-13-2012
12:12 PM
|
0
|
0
|
1188
|
|
POST
|
Once you get used to it you'll love script tools 🙂 In Catalog tree, right-click on the script tool and select Properties... Click on the second tab Source and check whether the path to the script is where you have saved your script: [ATTACH=CONFIG]15181[/ATTACH] If you still get error please email me at nahmed@esri.com - we'll post the result to the thread once solved.
... View more
06-13-2012
09:17 AM
|
0
|
0
|
5093
|
|
POST
|
Please enclose your code between CODE tags. Click on the '#' button above the text box to get the tags.
... View more
06-13-2012
08:40 AM
|
0
|
0
|
4019
|
|
POST
|
In 10.0, a new toolbox named Editing Tools is added. In that toolbox, you'll find the snap tool. Here is the link: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Snap/001v00000007000000/ The value you enter in Distance is not a fixed distance rather maximum distance - you can think of this as tolerance. So, any point on either side of your secondary line and within that distance will be snapped to the line at the closest point.
... View more
06-13-2012
08:21 AM
|
0
|
0
|
1172
|
|
POST
|
Give a try to Snap tool in the Editing toolbox (new in 10.0). Select points as Input Features and lines as Snap Environment. Choose EDGE as Type and 1 Meters (just an example) for Distance. The points should be snapped to the closest edge.
... View more
06-12-2012
11:49 PM
|
0
|
0
|
1172
|
|
POST
|
Use Calculate Field tool (under Data Management > Fields). The screenshot below shows an example. Here, in the expression I'm passing four field values to a function. The function is implemented in code block. I don't know what you want to do with the three values (min, max, mean). Here, I have just converted them to string and concatanated before returning (if the bird code is summer). [ATTACH=CONFIG]15164[/ATTACH]
... View more
06-12-2012
11:32 PM
|
0
|
0
|
1874
|
|
POST
|
You'll get more details in this topic: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Reading_geometries Here is my modified version of the sample in the above topic: import arcgisscripting
gp = arcgisscripting.create(9.3)
infc = "path to input features"
dsc = gp.Describe(infc)
shapefieldname = dsc.ShapeFieldName
rows = gp.SearchCursor(infc)
row = rows.Next()
while row:
feat = row.getValue(shapefieldname)
partnum = 0
partcount = feat.PartCount
# iterate through each part of a multipart feature
while partnum < partcount:
poly = feat.GetPart(partnum)
poly_area = poly.Area
partnum += 1
row = rows.Next()
del row
del rows
The code is not tested thoroughly - you may need to edit if you find any error.
... View more
06-12-2012
11:00 PM
|
0
|
0
|
1328
|
|
POST
|
There are python examples in Desktop (and web) help: This is how you read geometries using Python - one sample reads polygons and prints point coordinates. Reading Geometries This topic shows how you can construct polylines from point data. Writing Geometries You can combine the samples/concepts in the above topics to get your job done. If you are lookin for .Net (C# or VB.Net) solution then post your question to this forum: Forum > ArcGIS > Products > ArcObjects - All Development Languages
... View more
06-12-2012
02:17 PM
|
0
|
0
|
606
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-25-2012 08:20 AM | |
| 1 | 12-18-2019 03:56 PM | |
| 1 | 05-06-2020 01:18 PM | |
| 1 | 07-23-2021 10:33 AM | |
| 1 | 07-28-2020 09:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-25-2021
03:13 PM
|