0
votes
0answers
27 views

Does somebody has a Python script for a Multiple Flow Algorithm?

I´m looking for for a python script for a multiple flow algorithm assigning flow to all lower cells from one central cell. This algorithm is part of the r.terraflow and would need it to start at a ...
0
votes
0answers
18 views

GRASS r.out.mat memory issues

we have built a model with pythn/GRASS that calls the r.out.mat module. The area is quite large 25,000x25,000 cells. The machine we are running it on is Windows 7 machine with 16GB of RAM. After a ...
0
votes
1answer
74 views

How to use python to set a variable to a value from a vector attribute table for GRASS

I'm adding to a python script for GRASS v.transects.py. I want to set a variable to equal a value from a field in the vector's attribute table using a for loop to cycle through each row. This is one ...
0
votes
0answers
22 views

Use python to execute GRASS module v.distance

I have successfully use python script to import a line shapefile and a point shapefile into GRASS, and the following are their attribute table in QGIS, line shapefile point shapefile Now I want ...
1
vote
0answers
92 views

QGIS 2.2.0 GRASS not worked

I use QGIS 2.2.0 on Windows 8 64 bit. I try to install use Standalone installer and OSGeo4W and still get the error And then i start GRASS C:\Program Files (x86)\GRASS 6.4.2>grass64 ╬╪╚┴╩└: ...
1
vote
1answer
33 views

Problems running grass.mapcalc

I am using the GRASS Python Scripting Library on Ubuntu 14.04 with the packages available from the Universe repository. I have the following block of code: try: ...
0
votes
0answers
35 views

QGIS r.cost / r.drain and errors

I'm trying to find the optimal route of several archaeological sites with Qgis 2.2. I've a DEM and r.walk or r.viewshed executed successfully, but r.cost always fails creating the output, however ...
0
votes
0answers
20 views

Is it possible to compile a grass addon into a commandline app?

As the title says, I'm wondering if it's possible to take the source of a grass add-on and compile it into a commandline app. Or, alternatively, use the add-on in a python program. Basically, I ...
0
votes
0answers
76 views

GRASS “Argument list too long” with run_command

I have a python script that uses the grass.script.run_command function to read in, process, and export a bunch of raster files. On projects where I have a large number of rasters (>1,000), it fails ...
0
votes
2answers
101 views

Matlab script - how to access from/run in GRASS GIS?

I am currently working on shell script in GRASS GIS and Ubuntu. At some point, I must run a calculation (based on an ascii grid) that I have available as Matlab script and .exe (created from Matlab I ...
0
votes
1answer
20 views

GRASS module g.mremove returns irrational outputs

I want to use g.mremove to remove multiple files in my mapset, import os import sys sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python')) import grass.script as g import ...
1
vote
2answers
159 views

Why my python script of r.watershed has no output?

I type those code in pyscripter, import os import sys #set up GRASS environment variables sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python')) import grass.script as g import ...
0
votes
0answers
71 views

No data appears when using gdal_calc.py but source had data values

I'm in the process of calculating topographic exposure using a mix of GDAL, grass, R and python in Windows. I need to process a very large tiff file using the following calculation: ...
0
votes
1answer
34 views

Better ways to check if GRASS r.water.outlet works out fine output

I use my python script to call GRASS module r.water.outlet from outside, and here's my script(I perform this script in pyscripter): import os import sys #set up GRASS environment variables ...
0
votes
1answer
47 views

Difference between python IDLE and eclipse on accessing GRASS

I have seen these posts:GRASS and Python, Using Eclipse to develop GRASS Python programs. I used to use python IDLE to control GRASS, but I can't make python and GRASS connected, as I described in ...
1
vote
3answers
221 views

Problem with python script to control GRASS GIS from outside - How to import grass.script under Win 8.1?

I am working with GRASS 6.4.3 and python 2.7.6 under WIN 8.1. I am a novice with computer science and coding, and I have seen many posts including those:Is it possible to use GRASS GIS in Python ...
1
vote
0answers
50 views

header information is missing from image, after writing using opencv

I am doing complement of an image using open-cv python, while writing the image, open-cv is not writing the header information in the complemented image. my image data are in TIFF format. i am doing ...
1
vote
1answer
75 views

Is it a good idea to use GRASS Algorithms for Geoprocessing in a Server Environment?

I´m designing a web-service to run in a server environment that will do some geoprocessing actions to datasets uploaded by users and send the results back. I´m programming in Python, and so far I´ve ...
3
votes
2answers
317 views

How to set all pixels with value <= 0 to “nodata” in DEM raster?

I have a DEM raster with pixel values between about 3000 and -0.0003. I need to set all pixel with a value of 0 and smaler (<=0) to "nodata" (for later raster calculations and to reduce the ...
3
votes
2answers
152 views

Create network from shapefile without ArcGIS?

I want to perform shortest-path analysis on a network whose edges represent real-world roads and whose nodes are buildings or other locations. I have the shapefile for the area I'm interested in. ...
1
vote
2answers
183 views

How to calculate peaks in a DEM

How could I extract all peaks from a DEM (large mountainous area)? Peak means something like: a pixel which is sourrounded by other pixels with smaler elevation numbers in a area arround the ...
1
vote
1answer
104 views

Python + Grass: No such file or directory: 'PERMANENT\\MYNAME' (solved)

I have an existing Python script that processes raster images with Gdal / Numpy. Now I want to extend the script with Grass. The python script is developed on Windows 7 with Eclipse/Pydev. The script ...
2
votes
1answer
130 views

How to join USDA SSURGO soil table data to features in QGIS?

I am trying to make a soil map using QGIS. The only problem is that I cannot join table data to features in QGIS. In ArcGIS for Desktop you just open the folder and then join the tabular table ...
9
votes
1answer
435 views

Import GRASS and SAGA modules to python script

I'm new at this. I am "building" a python plugin for qgis and I want to import modules from GRASS and SAGA but I don't understand how to do it. The plugin I want to import is Kriging interpolation ...
0
votes
1answer
82 views

Set Grass Region in Python grass.script

How can I set the Grass Region in Python without already having a map in the Mapset? Basically I am looking for the equivalent to this window Currently I am only able to extent an existing region, ...
1
vote
2answers
279 views

How to remove z & m coordinates from shapes with QGIS? (Or arcgis, grass, gdal, Python…)

I've recently received some parcel data in shapefile format that has z & m coordinates (all = 0.0). The WKT for a typical parcel looks like this: "MULTIPOLYGON (((2672464.560700002 ...
2
votes
0answers
146 views

How can I create random concave polygons for test purposes?

In the context of generating random test data using QGIS (in a shapefile): I can generate random, continuous (adjacent) polygons by first creating n random points using ftools and then generating a ...
2
votes
3answers
936 views

Viewshed / Line of Sight analysis- as a batch process?

I wish to carry out a line of site analysis similar to the subject in here (preferably within QGIS): Visual Impact Assessment in QGIS or GRASS Scenario: I have two points, A and B. Point A is a ...
1
vote
1answer
48 views

Communicate synchronously & continuously (coords, etc) from terminal to application-based mapping software such that updates are displayed live on map

I run a lot of spatial queries. Hundreds of thousands a week. While these things are running, it would be nice if I could see what (where, actually) my scripts are working with. Distance calculations, ...
3
votes
1answer
146 views

GRASS 6.5 or 7.0 - Need Help with Loop Script

I am new to Python and scripting in general. This is also my first time a posting question. My overall goal is to create a script that I can cycle through all the raster maps in a mapset and then ...
1
vote
1answer
119 views

Grass GIS and Python Error

I am trying to use Python with Grass GIS. To get started I try to read in a raster TIFF. The import of grass.script works fine: import grass.script as g But if I am trying to run a command I get ...
4
votes
1answer
237 views

Is it possible to use GRASS GIS in Python stand alone scripts?

I am trying to find a least cost path script for Python. I came across r.drain from GRASS GIS. Is it possible to use GRASS GIS in a Python stand alone script? If so where can I download the bindings?
0
votes
1answer
72 views

Where do I find the code for gd_calc.py?

I need to create a raster that is the average of a large set of other rasters (many thousands). I've learned from another question that the script gd_calc.py can do a limited version of this, limited ...
-1
votes
1answer
64 views

Is it possible to import/run AML script into GRASS?

I have an AML script that has instructions to import tmp files of (grid, network, basin...) is there any way to run the script in GRASS? I tried to converted to Python but I couldn't do it for the ...
0
votes
1answer
223 views

r.basin.py GRASS addon

I have added this add on with g.extension on my grass 6.4.3RC3. But it doesnt work... this is the error I can see: Traceback (most recent call last): File "C:\Program Files (x86)\GRASS GIS ...
0
votes
1answer
171 views

how to loop grass command in python and put variable in output file

anyone, first day Grass programming with python scripting; first prob; simple I want to reclass the same raster several times; and save the file with the value loop variable at the end ... can not ...
0
votes
1answer
266 views

qgis plugin: “WindowsError: [Error 6] The handle is invalid”

OS: Windows 7 64bit GIS: QGIS 1.8 (qgis.org/downloads/QGIS-OSGeo4W-1.8.0-2-Setup.exe) path variable: GISBASE=C:\Program Files (x86)\Quantum GIS Lisboa\apps\grass\grass-6.4.3RC2 ...
0
votes
0answers
168 views

Help in GRASS/QGIS/Python

I have Idea about ArcGIS, and a bit of QGIS and zero programming knowledge, which I am trying for thesedays. I saw GRASS GIS and have started working with shapefiles, which are not being loaded... :( ...
3
votes
2answers
173 views

How do I tell GRASS where to find Python?

For some reason, when I start GRASS on my Mac it says that it has found Python 2.6.7. However, /usr/bin/python version is 2.7.2 and I can't find a lower version anywhere on my system. Potentially ...
0
votes
0answers
59 views

Why don't libgrass.so.1.8.0 and libqgissqlantconnection.so.1.8.0 load?

I have compiled Qgis 1.8 at Ubuntu 12.10, but some phyton plugins does'nt work, like sextante. Trying to solve this problem, some files don't have been load. They are: libgrass.so.1.8.0 and ...
1
vote
1answer
134 views

How to begin with tool development for GRASS gis or QGIS GRASS

I wanted to begin with customized tool development in Grass GIS or QGIS grass. How should i begin in to develop the tool. I search a lot in google search engine for begin with tool development in ...
2
votes
2answers
160 views

Issue while running grass from subprocess

I have a map based web application using geodjango. I needed to display the crime hotspots within a selected polygon area. I found that v.kernel is very good for generating heatmaps/hotspots. So in my ...
4
votes
1answer
160 views

Programmatic raster-vector calculation

I currently use GRASS' r.mapcalc to find the difference between vector and raster data using a loop and temporary files and layers. Is it possible to do the core calculation between raster with a ...
3
votes
2answers
93 views

Is there a workaround for GRASS i.maxlik 'class' being a keyword in Python?

I am running i.maxlik in python - attempting to automate a processing chain. I use the command: grass.run_command('i.maxlik', group= group, subgroup=subgroup, class='classification', sigfile = ...
2
votes
1answer
832 views

GRASS Geoprocessing in Python Script

I´m trying to get some GRASS geoprocessig tools running in a python script outside GRASS. I´m able to import grass.script, but I´m not able to get the tools running yet. Does anybody know what I´m ...
9
votes
1answer
321 views

Is there a way to use ArcPy and PyGRASS tools in the same Python script?

I´m trying to write a Python script, that includes different ArcPy / ArcGIS commands and want to combine it with GRASS geoprocessing tools. Unfortunately importing the GRASS libraries doesn´t work. ...
1
vote
1answer
454 views

Raster operation with grass.mapcalc

I need to iteratively add each raster map of viewshed analysis obtained from a series of single observer locations. For this i used grass.mapcalc with Python (GRASS 7 for Windows). However, my ...
2
votes
1answer
435 views

Integrated viewshed analysis

I need to do integrated viewshed analysis of a target with several observer locations. I am going to use r.viewshed analysis function in GRASS. With this function, it is possible to perform analysis ...
3
votes
1answer
104 views

Showing map in Grass Layer Manager/Map Display via Python

I've created some raster(tif) maps using Grass libraries in Python. I want to opem them automatically in Grass GIS Map Display or Layer Manager after creation. I don't want to use GUI for this. What ...
5
votes
1answer
400 views

How to call GRASS modules in pyQGIS?

I wish to use a Grass module (v.to.db) in QGis, without the grass toolbox. I tried with the Python console, but to no avail : Using Sextante plugin but obviously it didn't know all the grass ...