Tag Info

Hot answers tagged

10

Since you are using v10.2 it is looking for the path of the Spatial Analyst toolbox which has changed directory locations slightly from v9: To update, open the ruggedness.py file using Notepad or some other text editor and change line 20 path to something like this: C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Toolboxes\Spatial Analyst Tools.tbx


2

Try the following: #!/bin/bash read -p 'Enter country code: ' EXP echo "exporting data from $EXP" echo ogr2ogr -f GeoJSON export.geojson PG:'dbname=alamedaok user=postgres host=localhost' -sql "SELECT id_alameda, pais, geom FROM poblaciones_def WHERE pais = '$EXP'" Notes: read uses the -p parameter to set the prompt You used backquotes (``) in your SQL ...


2

Bash is particular about the quote characters `, ' and ". Use double quotes to substitute the variable in a string like "wonderful $VAR". Also with Bash, the convention is that variables are upper-case, and I'd avoid using export as a variable name since it is a command for environment variables. Consider these changes: #!/bin/bash read -p "enter country ...


2

You can use the python threading library to run a function periodically: I have used the following statements to remove a set of graphics after 3 seconds: from threading import Timer Timer( 3, self._clearGraphicLayer, ()).start() def _clearGraphicLayer(self): for graphic in self.graphicsLayer: self.iface.mapCanvas().scene().removeItem(graphic) ...


1

if i understand the question - one way would be to use a SearchCursor - the cursor can vary slightly depending on your version of arcgis, but basically use the search cursor to total the value and calculate the average and variance. something similar to: numberOfRows=0 total=0 data=[] with arcpy.da.SearchCursor('yourshapefile.shp','GRID_CODE') as sCursor: ...



Only top voted, non community-wiki answers of a minimum length are eligible