|
POST
|
Just to be clear, are you hoping for something like a dropdown list of streetnames that would select and zoom to the chosen street?
... View more
02-16-2015
02:18 PM
|
0
|
4
|
1488
|
|
POST
|
I think you're looking for Explode, a very useful tool hidden away on the Advanced Editor toolbar.
... View more
02-16-2015
09:48 AM
|
3
|
0
|
11872
|
|
POST
|
I'm not sure your entire question made it through, but here are my thoughts based on what you've provided. If you've already got a python script to filter layer A, then you may as well add in a couple lines to select by location those tiles in your index layer overlapping layer A, Copy Features to a new index layer, and renumber the page numbers, if desired.
... View more
02-16-2015
09:39 AM
|
0
|
4
|
1473
|
|
POST
|
If you're not talking about ArcMap, what software are you using? ArcScene, AGOL, web map, other?
... View more
02-16-2015
08:29 AM
|
0
|
1
|
1998
|
|
POST
|
The ET GeoWizards example Xander linked to seems to give good results, which should work for your canals:
... View more
02-15-2015
05:21 PM
|
2
|
1
|
4369
|
|
POST
|
Have you looked into the Thin tool? It's not perfect, and takes some fiddling with parameters, but may get you where you want to go. 1.) Polygon to Raster 2.) Thin 3.) Raster to Polyline
... View more
02-15-2015
04:45 PM
|
2
|
1
|
4369
|
|
POST
|
At the risk of doing your homework for you (you're only hurting yourself, but I figure the assignment must be in by now), here's the answer: >>> with arcpy.da.SearchCursor("Hawaii","SHAPE@") as cursor:
... for row in cursor:
... print row[0].extent
... polygon = [arcpy.Polygon(arcpy.Array([arcpy.Point(row[0].extent.XMin,row[0].extent.YMin),arcpy.Point(row[0].extent.XMax, row[0].extent.YMin),arcpy.Point(row[0].extent.XMax,row[0].extent.YMax),arcpy.Point(row[0].extent.XMin,row[0].extent.YMax)]))]
...
372236.642923135 2094769.12137791 941120.12366655 2458884.21017432 NaN NaN NaN NaN
>>> arcpy.CopyFeatures_management(polygon,'in_memory\extent')
<Result 'in_memory\\extent'>
... View more
02-15-2015
03:53 PM
|
0
|
0
|
2856
|
|
POST
|
Although it sounds like you've already found an answer to the problem, but you could take advantage of try/except to label, or skip, null values: def FindLabel ( [LOT], [SUBDIVISION] ):
try:
return [LOT] + "\r" + [SUBDIVISION]
except:
return 'this had a null value' Another succinct way to write this is: def FindLabel ( [LOT], [SUBDIVISION] ):
if [LOT] and [SUBDIVISION]:
return [LOT] + '\r' + [SUBDIVISION]
... View more
02-15-2015
02:33 PM
|
0
|
0
|
788
|
|
POST
|
I don't know of a way, but I'd be very interested to know, too! This is an issue for me working on dual monitors at the office, but one monitor at home via virtual desktop to the office machine - windows constantly opening off-screen on the wrong monitor.
... View more
02-15-2015
01:00 PM
|
0
|
0
|
6205
|
|
POST
|
This embellishment on your second (glob) script works for me. It saves the shapefile with the same name to a test folder. You can easily add a suffix, if you want: >>> import glob, os
>>> folder = r'C:/junk/'
>>> for shapefile in glob.glob( folder + '*.shp' ):
... output = os.path.join(r'C:/junk/test' + os.path.basename(shapefile))
... arcpy.Buffer_analysis( shapefile, output, '100 METERS')
... View more
02-15-2015
12:58 PM
|
0
|
0
|
11022
|
|
POST
|
In any case, this is how I usually see and use da cursors: >>> with arcpy.da.SearchCursor("YOUR_LAYER_HERE",("ID","FID")) as cursor:
... for row in sorted(cursor):
... print row
... View more
02-15-2015
12:25 PM
|
2
|
1
|
2837
|
|
POST
|
You have two "in"s: "for row in in sorted(cursor):"
... View more
02-15-2015
12:19 PM
|
0
|
0
|
2837
|
|
POST
|
Just following up on how to calculate NDVI through the Raster Calculator: The basic formula is : (NIR-VisRed)/(NIR+VisRed), where NIR = near-infrared band (or raster) and VisRed = visible red band (or raster). There are two tricky parts to using this formula in Raster Calculator: 1.) You will likely want to specify an individual raster band (or bands) within a multiband raster. You can only do this using the full file path in (10.1 at least), appending "\Band_1" (or other band number) to the end. For example, this would point to band 5 in a raster stored in "C:/rasters/raster.tiff": "C:/rasters/raster.tiff/Band_5" 2.) Your bands are likely integer rasters. An integer raster plus, minus, multiplied, or divided by another integer raster results in an integer raster. However, an integer raster operated by a floating point raster results in a floating point raster. We want a floating point NDVI layer in the end, so we must cast at least one of the integer rasters to floating point (the floating point will propagate through the formula). You can cast an integer to floating point using "Float(raster)" (note the capital "F"). In the example below, I have a one-band NIR raster loaded in ArcMap and an RGB colour raster, from which I pull the red band. (Float("0015_nir.tiff") - "C:\rasters\0015_rgb.tiff\Band_1")/("0015_nir.tiff" + "C:\rasters\0015_rgb.tiff\Band_1")
... View more
02-15-2015
12:16 PM
|
1
|
0
|
5477
|
|
POST
|
Have you tried rebuilding the Spatial Index? This solves all kinds of random issues.
... View more
02-15-2015
11:30 AM
|
0
|
0
|
1447
|
|
POST
|
Also, your path to outRaster will not work as you expect. By leaving the variable fc[:-4] inside the quotes, it literally becomes part of the string (e.g. "...\Product\MonthlyET.gdb\fc[:-4]"). Instead, use the os module's path.join method to join your base path to the variable: >>> fc = "someraster2014"
>>> import os
>>> outRaster = os.path.join(r"\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb",fc[:-4])
>>> print outRaster
\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb\someraster
... View more
02-15-2015
09:51 AM
|
1
|
0
|
1645
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|