|
POST
|
I'm guessing this DEM is in a geographic coordinate reference system (decimal degrees), horizontally, and meters or feet vertically. You must first use the Project tool to switch to a projected coordinate system (preferably in the same horizontal units as vertical elevation), then run Slope to get meaningful values.
... View more
07-20-2015
03:03 PM
|
1
|
0
|
1456
|
|
POST
|
This is assuming your field is actually <Null>, not blank, or something else: Codeblock: def blah(field):
if field:
return "Yes"
else:
return "No" expression: blah(!yourfield!)
... View more
07-20-2015
02:34 PM
|
1
|
0
|
1278
|
|
POST
|
My example was overly complicated, selecting random bands and combining into one raster, but I don't think you're going to find a tool that does what you want without some customization. Below is code that will calculate the mean value for a range of bands and output that raster. Python doesn't have to be scary. Just open the Python window in ArcMap and copy/paste. Change the band numbers and raster paths to suit your own needs (just the values after '=' in lines 2 - 5). Text after '#' is a Python comment and will be ignored. >>> import os # import a library for later
... startBand = 1 # starting band number
... endBand = 5 # end band number
... inputRaster = r'C:\junk\YourInputRaster.tif' # input multiband raster
... outputRaster = r'C:\junk\YourOutputRaster.tif' # output single band raster
... rasterAdder = arcpy.Raster(os.path.join(inputRaster ,'Band_' + str(startBand)))
... for i in range(startBand+1,endBand+1): # loop through bands
... bandx = arcpy.Raster(os.path.join(inputRaster ,'Band_' + str(i))) # add bands together
... rasterAdder += bandx
... meanRaster = rasterAdder/((endBand - startBand) + 1) # calculate mean
... meanRaster.save(outputRaster) # save raster
... View more
07-20-2015
02:06 PM
|
1
|
0
|
1639
|
|
POST
|
You set 'x' on line 17, but then give it new values on lines 45 and 49. Use a different variable name in your loops if you want to maintain the value of x. See below for a very simple example of what's going on with your variable 'x': >>> x = 15
... for x in range(100):
... pass
... print x
...
99
... View more
07-20-2015
01:33 PM
|
2
|
0
|
2552
|
|
POST
|
Not sure I completely understand (do the grey lines actually appear, or is that just for clarity?), but you might try using a Page Definition to filter your shapes/labels matching the DDP index, rather than clipping by extent.
... View more
07-20-2015
11:25 AM
|
0
|
0
|
1468
|
|
POST
|
Oh right. You can run Summary Statistics using both polygon ID and ship ID as case fields. This will give you one row per polygon/ship combination. Calculate a new field to hold the polygon/ship combination. Then, run Summary Statistics on that table, using the polygon/ship combination field as the case field, and anything as the statistic field. It will create a new frequency field counting each unique combination.
... View more
07-20-2015
10:48 AM
|
2
|
1
|
2467
|
|
POST
|
Run Summary Statistics, using polygon ID as case field, and ship ID as the COUNT statistic field. Join the result back to your polygon layer to see the ship count for each polygon.
... View more
07-20-2015
10:33 AM
|
0
|
6
|
2467
|
|
POST
|
Here's how you can combine a sample of random raster bands into a new raster using Python. This assumes your bands are named "Band_1", "Band_2", etc. Change the numbers to suit your data - I don't have a 366 band raster to play with. >>> import os, random
... bands = []
... raster = r'C:\junk\comp_rast.tif'
... bandNumList = []
... for i in range(1,7): # create list from 1 - 6
... bandNumList.append(i)
... print bandNumList
... random.shuffle(bandNumList) # randomize list
... print bandNumList
... for i in range(3): # loop through first three in list
... bandx = os.path.join(raster,'Band_' + str(bandNumList))
... bands.append(bandx) # add appropriate band path to list of raster band paths
... print bands
... arcpy.CompositeBands_management(bands,r'C:/junk/three.tif') # create new composite raster
...
[1, 2, 3, 4, 5, 6]
[3, 1, 2, 6, 4, 5]
['C:\\junk\\comp_rast.tif\\Band_3', 'C:\\junk\\comp_rast.tif\\Band_1', 'C:\\junk\\comp_rast.tif\\Band_2']
... View more
07-20-2015
10:16 AM
|
0
|
2
|
1639
|
|
POST
|
What is the data type of the field you are attempting to calculate into? Also, is your feature class projected? From the field calculator help, regarding area tokens: Using areal units on geographic data will yield questionable results as decimal degrees are not consistent across the globe.
... View more
07-20-2015
09:01 AM
|
1
|
1
|
1278
|
|
POST
|
You can enter this any time after you've created the feature layer called "locations_lyr".
... View more
07-17-2015
02:17 PM
|
1
|
0
|
2397
|
|
POST
|
The main goal in choosing a projection is to minimize a certain type of distortion or accept the fact that all or some will be distorted more than others, between area, distance, or angle. Each projection has a sweet spot, at or between certain lines, where these distortions are minimized. You should choose a projection that fits your needs as far as type of distortion goes, as well as fits your geographical area. With that said, your local geographers probably have things mostly figured out. See what they use. For example, I live in British Columbia, which spans several UTM zones. If a project fits neatly inside UTM zone 9, we will likely use that coordinate system. If it spans from zone 9 to 10, chances are we will default to BC Environment Albers. For the US, here is an extensive list of what the USGS uses.
... View more
07-17-2015
02:03 PM
|
1
|
3
|
6804
|
|
POST
|
Along the lines you (and the rest of this thread) have outlined, this help page goes through the steps to clean up your image. One of my most visited pages, I'm sure.
... View more
07-16-2015
03:28 PM
|
3
|
1
|
4080
|
|
POST
|
This is an extremely open-ended question. I assume this map is focused on the geography of the conference itself (e.g. venues, rooms, activity locations, etc.), not conference participants or conference topic content. Do you want it to be interactive or static? Perhaps a standalone JS API web map is sufficient. Maybe you should check out story maps. Do you want to enable time (see who is speaking where and when)? There are lots of options, you just need to really think about what you want. Then, return with specific questions.
... View more
07-16-2015
01:51 PM
|
0
|
2
|
1880
|
|
POST
|
Make XY Event Layer creates a temporary point layer. Try saving it to a permanent point file. From the help: The output point feature layer created by this tool is temporary and will not persist after the session ends. You can export this event layer to a feature class on disk using the Copy Features,Feature to Point, or Feature Class to Feature Class tool.
... View more
07-15-2015
08:51 AM
|
0
|
2
|
1229
|
|
POST
|
Create one label for each color background, style the label as you want it, give it an ID, and save them in your mxd (off the map is fine). Then, you can access the TextElement by its ID, copy it, and position it, all through Python.
... View more
07-14-2015
11:12 AM
|
0
|
0
|
4257
|
| 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
|