POST
|
Hi Marcin, Thanks for your suggestion. Unfortunately I can't act on it as I work in an organisation where individual users do not have the required "admin rights" to change firewall access. I have raised this with our centralised IT department. When I open up the Python IDLE "shell" the text below always appears. Most of the time I don't have a problem running scripts. Only occasionally do I get the error which I don't think is anything to do with the script itself (e.g. today I couldn't even open any scripts as I couldn't get beyond the error messages previously posted). This suggests that it might be an "environment" problem, but as I mentioned, I can't find any way round it other than a PC restart. I guess I'll have to see what our internal IT department suggest unless you have any other suggestions? Best wishes, Steve Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 2.6.5 >>>
... View more
07-10-2012
12:54 AM
|
0
|
0
|
452
|
POST
|
I'm using IDLE as my Python interface (enforced by Central IT I think). Sometimes I get the error messages shown in the attachment. Mostly I can be happily running a script for a while and then I get these errors. On other occasions they appear when I start IDLE for the first time before I have even opened a script. The only solution I have found is restarting my PC and logging on again (which takes ages). Has anyone come across this problem and got a solution which is quicker than a PC restart? Thanks Steve
... View more
07-09-2012
11:20 PM
|
0
|
2
|
1207
|
POST
|
Hi Marcin , Thanks for your help. I eventually tracked down the cause of the Error 010240. The extent of the output file was larger than the input file (as the "boundary" of the euclidean distance zone went beyond the extent of the input file for points near the edge). This would also happen when using the buffer tools or anything which created a zone around a feature. Manually setting the extent as below resolved that error. I didn't find anything about this elsewhere on the web so hopefully others who get Error 010240 will find this useful. # set extent - Parameter order is Left, Bottom, Right, Top; Values required = extent of input increased by size of euclidean distance "zone" in all directions. arcpy.env.extent = "355503.281300 9202524.000000 378630.750000 9225369.000000" Unfortunately, my output did not give the expected results. If a tool is used manually from ArcToolbox it only processes selected records. I had expected the same to happen using Python but it didn't. So all my output files were identical (i.e. euclidean distance to NEAREST feature rather than euclidean distance to a single feature as selected in the loop). I tried two methods of attempting to process a single record at a time. The first based on your suggestion (below) count = 0 for row in rows: count = count + 1 # print "ITERATION COUNT = " + count # print "FID = " + row.FID print count print row.FID #build the name of output raster: directory + filename HHxxxx_EucD where xxxx is the value of field FID in the input shapefile outRaster = os.path.join(outRasterDir, "HH" + str(row.FID) + "_EucD1k") # Temporary line below to display outraster filename and path (for debugging) print outRaster # Execute EucDistance # MAY NEED TO REMOVE PARAMETER outDirectionRaster FROM LINE BELOW AS DIRECTION RASTER IS NOT REQUIRED AND IS AN OPTIONAL PARAMETER # outEucDist = EucDistance(inSourceData, maxDistance, cellSize, outDirectionRaster) outEucDist = EucDistance(inSourceData, maxDistance, cellSize) # Save the output outEucDist.save(outRaster) and the second came from another thread as mentioned in comment in code below: # Need to process only the selected record - See http://forums.arcgis.com/threads/8428-Setting-a-Single-Record-to-Selected-with-Python # for source of baseline code that follows lookupDict = {} searchRows = gp.searchcursor(inSourceData) searchRow = searchRows.next() while searchRow: lookupDict[searchRow.FID] = [searchRow.FID] count = count + 1 # print "ITERATION COUNT = " + count # print "FID = " + row.FID print count print searchRow.FID #build the name of output raster: directory + filename HHxxxx_EucD where xxxx is the value of field FID in the input shapefile outRaster = os.path.join(outRasterDir, "HH" + str(searchRow.FID) + "_EucD1k") # Temporary line below to display outraster filename and path (for debugging) print outRaster # Execute EucDistance # MAY NEED TO REMOVE PARAMETER outDirectionRaster FROM LINE BELOW AS DIRECTION RASTER IS NOT REQUIRED AND IS AN OPTIONAL PARAMETER # outEucDist = EucDistance(inSourceData, maxDistance, cellSize, outDirectionRaster) outEucDist = EucDistance(inSourceData, maxDistance, cellSize) # Save the output outEucDist.save(outRaster) Any ideas on how to loop through a shapefile one record at a time, use the selected single feature as the input file, generate and save an output raster for the euclidean distance from that single feature and then move onto the next feature etc.? I will start a new post for this query as it no longer relates to Error 012420 but added here so that you will see it. Many thanks Steve
... View more
06-06-2012
05:15 AM
|
0
|
0
|
358
|
POST
|
Hi, I'm trying to run the Euclidean Distance tool from a python script (my first attempt at python) and keep getting the message below: Traceback (most recent call last): File "E:/VTA/Models/Calc_Distance_Household_LOOP.py", line 44, in <module> Dist_HH0.save("E:/VTA/TEST/output/Distance_from_Household/Script_First_10_HH") RuntimeError: ERROR 010240: Could not save raster dataset to E:\VTA\TEST\output\Distance_from_Household\Script_First_10_HH with output format GRID. I'm assuming that the raster will be called Dist_HH0 and will be saved in the folder Script_First_10_HH following the filepath in the error message. How do I overcome this error please? Ultimately, I want to run the euclidean distance tool on numerous points in a shapefile and create a seperate raster for each point using a loop. How do I change the raster output name for each iteration of the loop? Any help with resolving this would be much appreciated. Thanks Steve
... View more
06-05-2012
03:39 AM
|
0
|
3
|
2752
|
POST
|
Thanks to ESRI staff Lauren Rosenshein and Lauren Scott the problem is resolved. I had selected the events layer as the input file which is not capable of being processed by the OLS tool. By exporting the layer, saving it as a shapefile and then using the new shapefile as the input feature for the OLS tool everything worked fine. The problem with the OLS tool allowing events layers to be visible (and therefore selectable) in the dropdown box for the input feature has apparantly been corrected in ARCGIS 10.0 (SP1). If you are using an earlier version, make sure that you don't try to use an events layer as the input feature - otherwise you will get the vague "catch all" error message "ERROR 999999: Error executing function. A locator with this name does not exist" Hope this helps. Many thanks again to the two Lauren's. Steve
... View more
12-02-2010
12:37 AM
|
0
|
0
|
776
|
POST
|
Hi Lauren, Many thanks - I have just sent an e-mail with the details that you requested. Thanks Steve
... View more
11-30-2010
11:05 PM
|
0
|
0
|
776
|
POST
|
I get the following error when running the Ordinary Least Squares script from the Spatial Statistics tools. It's very vague. Please can someone give me a clue about how to identify the error and resolve it? Running script OrdinaryLeastSquares... <type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function. A locator with this name does not exist. Thanks Steve
... View more
11-30-2010
12:54 AM
|
0
|
4
|
8050
|
POST
|
I have produced some Ordinary Least Squares (OLS) and Geographically Weighted Regression (GWR) regression models and I want to identify which model is better. According to http://resources.esri.com/help/9.3/arcgisengine/java/Gp_ToolRef/spatial_statistics_tools/interpreting_gwr_results.htm "Comparing the GWR AICc value to the OLS AICc value is one way to assess the benefits of moving from a global model (OLS) to a local regression model (GWR)". However, whereas the OLS tool in ARCMAP 9.3 outputs straightforward AIC (NOT AICc), the GWR tool appears to output AICc (i.e. a "corrected" version of AIC). According to Fotheringham, A.S., Brunsdon, C. & Charlton, M. (2002) Geographically Weighted Regression - the analysis of spatially varying relationships John Wiley & Sons, Chichester. (page 96) "direct comparisons should NOT be made between AIC and AICc". I'm therefore wondering how I can validly compare my OLS and GWR models when the diagnostics appear to give me incompatible outputs for that purpose. I'm rather confused. Please could someone advise whether the outputs are comparable after all and if not, why have they been "programmed" in this way? I'm a non-statistician so I don't understand the nuts and bolts of the underlying calculations. Any assistance would be appreciated. Thanks Steve
... View more
07-19-2010
04:52 AM
|
0
|
3
|
7150
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|