Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I got this error:

enter image description here

Or don't click "open output file after running algorithm", but there is no new shapefile created on my desktop.

How to solve this problem and split lines at a specified distance?

PS. I use QGIS 1.80 under WIN7-64 bits

share|improve this question

1 Answer 1

You must first understand how sextante work.

  • at first launch, sextante create a folder named "sextante" in /.qgis/sextante/ or in home/sextante (I am not on Windows and you must find it)
  • in this folder there are files and folders but the most interesting in this case are the files files ending with .log as "sextante_qgis.log" .
  • if you open this file, you find the result of the process or the resulting errors that allow you to solve them theoretically...

example on success

ALGORITHM|Fri Apr 05 2013 09:13:37|sextante.runalg("grass:v.split.length","/Users/Shared/Dropbox/fiona/testligne.shp",5,"269884.209174,275291.220593,151805.191715,156117.927014",-1,0.0001,None)

example of error

15:20:27|sextante.runalg("grass:r.profile","/Users/Shared/telechargement/04_02_13/qProf_example_data/vn_aster_w4u3.asc","0,0,1,1",1,"*",False,False,"317567.856321,332284.033146,4730903.40292,4746152.16519",None)
ERROR|Sat Feb 02 2013 22:48:44|Could not load model watersheds.model|ALGORITHM:saga:catchmentarea(parallel)

Whatever the chosen software Sextante uses the Python subprocess module to call directly the application and not specialized modules such as rpy2 or grass.script. (files GrassUtils.py or RUtils.py in the module, for example).

In the case of a GRASS GIS module:

  1. sextante will first create a temporary GRASS LOCATION and a temporary GRASS MAPSET (depending on the characteristics of the shapefile) and import the selected file (folder "tempdata") with v.in.ogr (sextante uses the original shapefile file and not the QGIS layer)
  2. sextante creates a temporary file named grass.script.sh (or .bat) or grass_batch_job.sh (or .bat), depending on the sextante version used, with the command processing.
  3. sextante apply this command
  4. if success, sextante export the resulting layer from GRASS to a shapefile (with v.out.ogr) and loads this shapefile in QGIS
  5. if error, nothing or error message as in your case
  6. in both cases, sextante writes the result in the "sextante_qgis.log" file (success or errors)
  7. sextante delete the temporary folder and the temporary file

example of temporary file (grass_batch_job.sh ) for the command v.split.lenght

g.proj -c proj4="+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=-106.869,52.2978,-103.724,0.3366,-0.457,1.8422,-1.2747 +units=m +no_defs"
v.in.ogr min_area=0.0001 snap=-1 dsn="/Users/Shared/Dropbox/fiona" layer=testligne output=tmp1365146017452 --overwrite -o
g.region n=156117.927014 s=151805.191715 e=275291.220593 w=269884.209174 res=1
v.split input=tmp1365146017452 length=5 output=output4215a11fb9c742d1ac50ddef42cdb4c7 --overwrite
v.out.ogr -ce input=output4215a11fb9c742d1ac50ddef42cdb4c7 dsn="/var/folders/vu/vu099NovH-KZpE5TEa83BU+++TI/-Tmp-/sextante" format=ESRI_Shapefile olayer=grassvsplitlength3c2d8ad54a0f4ffa94db5f0d1ca0687c type=auto
exit

So, in your case, what is the error message in the log file ?

share|improve this answer
    
Hi, the error message in my log file is:Started logging at Sun Apr 14 2013 16:17:47 ERROR|Sun Apr 14 2013 16:17:47|Could not load model watersheds.model|ALGORITHM:saga:catchmentarea(parallel) ERROR|Sun Apr 14 2013 16:17:48|Could not load model watersheds.model|ALGORITHM:saga:catchmentarea(parallel) ALGORITHM|Sun Apr 14 2013 16:18:15|sextante.runalg("grass:v.split","C:\\Users\\HeinzChen\\Desktop\\new _folder\\ToChienRouting.shp",10,10,"243379.450894,270873.438686,2726604.49059,274‌​8945.37146",-1,0.0001,None). –  Heinz Apr 14 '13 at 8:21
    
Hi, I am using GRASS module and facing the relevant problem:gis.stackexchange.com/questions/83795/…, could you give me some suggestions? Thanks. –  Heinz Jan 24 at 4:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.