POST
|
Hi, Thanks for your suggestions - I will investigate and update after the next practical session. Kate.
... View more
03-04-2012
05:49 AM
|
0
|
0
|
206
|
POST
|
Hi, I would calculate a Euclidean distance to road surface (there is a tool for this), and then sample this to the point data (so that you get an additional field in the attribute table giving the distance at that point to the nearest road). Kate.
... View more
03-02-2012
04:11 AM
|
0
|
0
|
370
|
POST
|
Hi Esther, I've used the geographically weighted regression tool to do this. There's a good tutorial on this in the resources centre (search for GWR or OLS) that explains the assumptions / limitations of using correlation on spatial data (issues of spatial autocorrelation etc) and shows you how to use the tools. As far as I understand, both your datasets have to be shapefiles - it doesn't work on raster data. I used zonal tools to aggregate my raster data to zones. Hope this helps, Kate.
... View more
05-13-2011
12:44 AM
|
1
|
0
|
4471
|
POST
|
I have about 20 raster datasets that I want to use in a regression model. In order to do so I am trying to create a polygon shapefile where the value from each raster dataset is included in its own attribute field. So far I have created a shapefile consisting of a grid of squares that directly overlays my raster datasets (the cells in both line up correctly). I have also created a point shapefile for each raster dataset (using extract values to points), with the ID for each point corresponding to the correct cell in the grid shapefile. The issue I am having is that, although the shapefiles have different names, the attribute field I need is called "RASTERVALU" in all of them. I'm really not sure how to get the values from the point shapefiles into the grid shapefile. I have tried the following: Spatial Join. Took approximately 5 hours to process one shapefile (I have 20 to do) and the new field heading was still called RASTERVALU, meaning I wouldn't be able to distinguish between the different rasters in the attribute table. I tried changing the Alias in properties, but again this didn't save when I restarted ArcMap. Join. The second RASTERVALU field added to the original shapefile's attribute table, but this disappeared when I re-started ArcMap (i.e. it didn't seem to save what I'd done). Merge. I tried merging my point shapefiles to create one point shapefile with all attributes (as an attempt to get slightly further down the line!). The new shapefile only had one column called RASTERVALU - I was expecting 20. I've also looked into changing the field names for my point shapefiles, but this does not seem to be possible. I'm working with an Info license on 9.3. Any help would be very gratefully received! Thanks, Kate.
... View more
11-29-2010
12:22 AM
|
0
|
0
|
219
|
POST
|
Hi, I am trying to create a series of point shapefiles based on a series of raster datasets. I have set up and run the ExtractValuesToPoints tool in the Model builder (so I know the process works OK). I then exported the script to a .py file so I could iterate over all my files using a for loop (code below). When I run I get the following error message: Traceback (most recent call last): File "C:\models\ArcRegression\RasterToPoint.py", line 35, in <module> gp.ExtractValuesToPoints_sa(GridPoints, RasterFile, PointFileOut, "NONE", "VALUE_ONLY") ExecuteError: Failed to execute. Parameters are not valid. ERROR 000860: Input point features: is not the type of Composite Geodataset, or does not exist. Failed to execute (ExtractValuesToPoints). I think this means the geoprocessor is not reading my input parameter as a point shapefile. Having done some googling, I found some information on using GetParameterAsText(), but don't understand how the script will "know" what each parameter is without referring to the GUI box in ArcMAP (which I wan't to avoid as I wish to automate the process). Any advice gratefully received! Thanks, Kate. Code: # Import system modules import sys, string, os, arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Check out any necessary licenses gp.CheckOutExtension("spatial") # Load required toolboxes... gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx") # Local variables... FLocation = "C:\\models\\ArcRegression\\" #location of all files RasterFiles = ["amph_spprich", "amph_endrich", "bird_endrich", "bird_spprich", "cloudann9__11", "dem9__11", "llnd_gd", "llnd_res", "llnd_sv", "llnd_tv", "mamm_endrich", "mamm_spprich", "meantemp9__11", "mnts_gd", "mnts_res", "mnts_sv", "mnts_tv", "srtoaann", "sumrain9__11"] # Names of all raster files to be converted to points PointFilesOut = RasterFiles # To give output files same names as inputs GridPointsName = "9__11grid_1kmPoint" # Name of existing point file (used to extract from rasters) # Process: Extract Values to Points... for i in range(0,len(RasterFiles)): PointFileOut = str(FLocation) + str(PointFilesOut) + ".shp" RasterFile = str(FLocation) + str(RasterFiles) GridPoints = str(FLocation) + str(GridPointsName) print("Working on " + str(RasterFile)) gp.ExtractValuesToPoints_sa(GridPoints, RasterFile, PointFileOut, "NONE", "VALUE_ONLY")
... View more
11-22-2010
03:52 AM
|
0
|
2
|
774
|
POST
|
I tried both of those, but still get the same error. Out of interest, what does the 'r' before your second suggestion do?
... View more
07-29-2010
09:28 AM
|
0
|
0
|
301
|
POST
|
Hi, I'm trying to write a python script that will print the name of a raster dataset to screen. I copied the example code from the Desktop Help and changed the raster object to match the path to my dataset: import arcgisscripting gp = arcgisscripting.create() raster = "C:\data_all\AltLatGrids\ArcGISGrids\alb8__22" # Create a describe object # desc = gp.Describe(raster) # Print the RasterFieldName property # print desc.RasterFieldName When I ran the script I received the error message "Method RasterFieldName does not exist". I am using ArcGIS 9.3 with an ArcInfo license, and Python 2.5.4. Any help gratefully received! Kate.
... View more
07-29-2010
05:55 AM
|
0
|
4
|
520
|
Title | Kudos | Posted |
---|---|---|
1 | 05-13-2011 12:44 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|