|
POST
|
No, just add a second copy of the index layer. Once you set up your data driven pages, you can access Page Definition in the layer property's Definition Query tab (on every layer except the index layer). Using Page Definition Queries—Help | ArcGIS for Desktop
... View more
07-28-2015
01:26 PM
|
1
|
0
|
3110
|
|
POST
|
I think Wes is on the right track with the Page Definition. It looks like the index layer has a Page Definition, set to show the features not matching the current page, with a transparent grey fill. You can't set a Page Definition on the index layer itself, so you must load a second copy of the index layer and filter that.
... View more
07-28-2015
01:18 PM
|
1
|
2
|
3110
|
|
POST
|
I'm not sure if you've got this figured out by now, but here is generally how you can add multiple points from a feature set to a feature class: import arcpy
point = arcpy.GetParameterAsText(0) # the feature set (or in-memory fc)
pointFC = r'C:/junk/points.shp' # the on-disk fc
insCursor = arcpy.da.InsertCursor(pointFC,'SHAPE@XY') # create insert cursor
with arcpy.da.SearchCursor(point,'SHAPE@XY') as cursor: # loop through feature set
for row in cursor:
insCursor.insertRow(row) # insert row
del insCursor # delete insert cursor Of course, you could just as easily run the Append tool rather than using cursors, but I assume you have a specific reason for going into this detail.
... View more
07-28-2015
12:07 PM
|
2
|
6
|
2670
|
|
POST
|
Thanks again, Freddie. My major problem was an incomplete understanding of what a Feature Set is, and how to use it. In particular, I did not realize, until now, that the crucial step I was missing in setting up my Feature Set parameter was setting its schema. Anyhow, now that I've set the schema, I'm off to the races.
... View more
07-28-2015
10:07 AM
|
0
|
0
|
1809
|
|
POST
|
Thanks, Freddie. Perhaps I misread the original question here, which indicated that the working script generated a new point feature based on the click coordinates, not used a previously existing point feature from an existing feature class. My understanding was also that this would have to be done using a Python Add-In, but that didn't seem to be how he was using it.
... View more
07-27-2015
04:01 PM
|
0
|
2
|
1809
|
|
POST
|
Like a blind squirrel accidentally finding a nut, I managed to answer this question without understanding the main interesting point: collecting a click event and populating a script parameter with its coordinates. Here's the final, working script in question: #import modules
import arcpy
point = arcpy.GetParameterAsText(0) #click
An = "AnimalPoints" #target point feature class Animal Sightings
for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):
x,y = prow[0]
del prow
point1 = arcpy.Point(x, y)
ptGeometry = arcpy.PointGeometry(point1)
with arcpy.da.InsertCursor(An,['SHAPE@XY']) as cursor:
cursor.insertRow([(x,y)]) Can someone please explain in what context line 4 ("point = ...") could possibly be populated with coordinates from a click event on the map? My understanding is that this is run from a regular old script tool (parameter type = record set), in a regular old toolbox, not a Python Add-In.
... View more
07-27-2015
03:14 PM
|
0
|
4
|
4494
|
|
POST
|
The examples in the help show the basic pattern: use walk() to populate a list of files, for each file (possibly meeting a criteria, like being a shapefile) do something. Your something is to copy into a mdb.
... View more
07-27-2015
02:54 PM
|
0
|
0
|
2856
|
|
POST
|
1.) Walk through your nested folders: either os.walk() or arcpy.da.Walk() would work 2.) Import, one by one, into your mdb (many possible tools. Perhaps, Copy Features)
... View more
07-27-2015
02:30 PM
|
2
|
2
|
2856
|
|
POST
|
This answer caught me somewhat off-guard as the reference is from 1986, well before Landsat 7 and 8 (more common/possible for current imagery) were launched. Anyhow, make sure you use the correct band combination for the sensor that collected your imagery - the band ranges are different. See here for more from the same reference, with other possible satellites: http://www.tft-earth.org/wp-content/uploads/2015/04/HCS-Approach-Toolkit-Ch3-GIS-analysis.pdf
... View more
07-27-2015
02:13 PM
|
2
|
1
|
5196
|
|
POST
|
Check out the examples and documentation for ListFeatureClasses. Basically, get the feature classes into a list, then loop through the list.
... View more
07-27-2015
12:58 PM
|
1
|
4
|
3314
|
|
POST
|
It's hard to say without seeing your data, but here are some general ideas. 1.) Restart ArcMap and try again 2.) Try running from ArcCatalog 3.) Try buffering with background processing disabled 4.) Try running Check Geometry on your data. If there is an issue, run Repair Geometry. 5.) Try exporting your selected states to a new feature class and buffer that
... View more
07-27-2015
11:40 AM
|
1
|
0
|
707
|
|
POST
|
Can you explain this further? I was under the impression that once a raster was included in the expression, it is interpreted as map algebra. For example, similar to the original post: inRaster1 = arcpy.Raster(r"C:\DATA\RASTER\DEM\example")
elevMINResult = arcpy.GetRasterProperties_management(inRaster1, "MINIMUM")
elevMin = float(elevMINResult.getOutput(0))
outMinus = inRaster1 - elevMin I believe this should work, producing a new raster minus the constant, elevMin. However, I'm not clear on how Python actually decides to apply a map algebra expression on what may appear to be a normal expression.
... View more
07-27-2015
09:58 AM
|
0
|
1
|
5406
|
|
POST
|
In addition to Jake's answer (now deleted), here's why you need to cast to float. elevMin = float(elevMINResult.getOutput(0)) getOutput(0) returns either a record set, string, or layer. In your case it returns a string. >>> print type(elevMINResult.getOutput(0))
<type 'unicode'> In turn, your map algebra expression interprets the value as a string, or raster name.
... View more
07-27-2015
09:25 AM
|
0
|
0
|
5406
|
|
POST
|
No. The pop-up window is where you define the coordinate system of the original data. This can be a geographic or projected coordinate system, but it needs to be the coordinate system that corresponds to the data (e.g. if your data is lat/long coordinates, then you probably want to define a geographic coordinate system, as you've correctly done). Once you've correctly defined the data, you are free to re-project it using the Project tool in the ArcToolbox section, under Data Management tools -> Projections and Transformations -> Project. Run this tool to translate your unprojected data to a projected coordinate system. ArcGIS will do the math to situate the data in the correct location, but now it will also be in a linear unit, like metres or feet.
... View more
07-24-2015
02:47 PM
|
2
|
3
|
2719
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|