Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing: r.to.vect and v.generalize fail #21634

Closed
qgib opened this issue Oct 13, 2015 · 23 comments
Closed

Processing: r.to.vect and v.generalize fail #21634

qgib opened this issue Oct 13, 2015 · 23 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS

Comments

@qgib
Copy link
Contributor

qgib commented Oct 13, 2015

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 13592
Affected QGIS version: master
Redmine category:processing/grass
Assignee: Victor Olaya


r.to.vect input=tmp1444762289725 type=area output=outputb0d6bd9d340c4c829513101f45f91968 --overwrite
v.out.ogr -c -s -e input=outputb0d6bd9d340c4c829513101f45f91968 type=auto output="/tmp/processing/8a519603d75a423fa510b0d2a9e24e48" format=ESRI_Shapefile olayer=output


@qgib
Copy link
Contributor Author

qgib commented Oct 13, 2015

Author Name: Paolo Cavallini (@pcav)


Strangely enough, an apparently unrelated module (v.generalize) also creates an empty shapefile.
This is the command:
processing.runalg("grass7:v.generalize","/home/paolo/Scrivania/analisi/QGIS_data/processing/iterative/watersheds.shp",0,30,7,50,0.5,3,0,0,0,1,1,1,False,True,"262871.525725,277846.525725,4454025.0,4464275.0",-1,0.0001,0,None)

@qgib
Copy link
Contributor Author

qgib commented Oct 13, 2015

Author Name: Paolo Cavallini (@pcav)


  • subject was changed from Processing: r.to.vect fails to Processing: r.to.vect and v.generalize fail

@qgib
Copy link
Contributor Author

qgib commented Oct 13, 2015

Author Name: Markus Neteler (Markus Neteler)


This issue is not clear to me. Can you point me to a simple test case?

Eg using test data from here: http://grassbook.org/datasets/datasets-3rd-edition/
--> Data in common GIS formats (NC data set):
--> SHP/GeoTIFF

@qgib
Copy link
Contributor Author

qgib commented Oct 13, 2015

Author Name: Paolo Cavallini (@pcav)


In fact, basin_50k.tif works fine. With the attached file it does not. If I cut a portion of it, it works again.


  • 9182 was configured as basin_toscana.tif.zip

@qgib
Copy link
Contributor Author

qgib commented Oct 14, 2015

Author Name: Paolo Cavallini (@pcav)


It does not work with the data provided for the Processing tutorial as well.

http://qgis.org/downloads/data/training_manual_exercise_data.zip

@qgib
Copy link
Contributor Author

qgib commented Oct 14, 2015

Author Name: Paolo Cavallini (@pcav)


Check e.g. v.generalize on the iterative project.

@qgib
Copy link
Contributor Author

qgib commented Oct 18, 2015

Author Name: Markus Neteler (Markus Neteler)


Paolo Cavallini wrote:

In fact, basin_50k.tif works fine. With the attached file it does not. If I cut a portion of it, it works again.

I have tried, works fine here. Screenshot attached.


  • 9209 was configured as qgis2_10_processing_r_to_vect_toscana.jpg

@qgib
Copy link
Contributor Author

qgib commented Oct 18, 2015

Author Name: Paolo Cavallini (@pcav)


Thanks Markus for testing. Unclear what's happening (different GRASS version?).
Local issues not very likely (clean .qgis2, packages from official repos).
Here the log (note the ERROR: the layer exists in OGR origin; so it may be a Processing error):

0..2..4..6..8..10..12..14..16..18..20..22..24..26..28..30..32..34..36..38..40..42..44..46..48..50..52..54..56..58..60..62..64..66..68..70..72..74..76..78..80..82..84..86..88..90..92..94..96..98..100
176 areas built
One isle built
Isole allegate...
100
Centroidi allegati...
1..3..5..7..9..11..13..15..17..19..21..23..25..27..29..31..33..35..37..39..41..43..45..47..49..51..53..55..57..59..61..63..65..67..69..71..73..75..77..79..81..83..85..87..89..91..93..95..97..99..100
Numero di nodi: 270
Numero di primitive: 620
Numero di punti: 0
Numero di linee: 0
Numero di confini: 445
Numero di centroidi: 175
Numero di aree: 176
Numero di isole: 1
r.to.vect completo.
ATTENZIONE: The map contains islands. With the -c flag, islands will appear as filled areas, not holes in the output map.
Exporting 176 areas (may take some time)...
5..11..17..23..29..35..41..47..53..59..65..71..Segmentation fault
Esecuzione di '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh' terminata.
Cleaning up temporary files...
Cleaning up temporary files...
Sto avviando GRASS GIS...
Sto eseguendo '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh'...
ATTENZIONE: The map contains islands. With the -c flag, islands will appear as filled areas, not holes in the output map.
ERRORE: Il tematismo esiste già nell'origine dati OGR '/tmp/processingbb7ba8b2aa2042e4bdd2924383429d72/e13087a2923d4f8e81c545fffcd6f883'
Esecuzione di '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh' terminata.
Cleaning up temporary files...

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2015

Author Name: Markus Neteler (Markus Neteler)


Please post the output of your GRASS GIS version (g.version -g).

The "ERRORE: Il tematismo esiste già nell'origine dati OGR ..." looks like leftover file. You could try to set

export GRASS_OVERWRITE=1

to override that file.

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2015

Author Name: Paolo Cavallini (@pcav)


Thanks. Done, no change.

@qgib
Copy link
Contributor Author

qgib commented Oct 20, 2015

Author Name: Giovanni Manghi (@gioman)


No issues whatsoever with any of the above datasets. QGIS master, GRASS 7.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2015

Author Name: Paolo Cavallini (@pcav)


OK, got some more info:

  • same issue with other commands, in particular v.buffer
  • this might be due to issue with projections:

ATTENZIONE: Datum non riconosciuto da GRASS e nessun parametro trovato
Default region was updated to the new projection, but if you have multiple mapsets g.region -d should be run in each to update the region from the default
Informazioni sulla proiezione aggiornate

@qgib
Copy link
Contributor Author

qgib commented Oct 26, 2015

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

OK, got some more info:

  • same issue with other commands, in particular v.buffer
  • this might be due to issue with projections:

ATTENZIONE: Datum non riconosciuto da GRASS e nessun parametro trovato
Default region was updated to the new projection, but if you have multiple mapsets g.region -d should be run in each to update the region from the default
Informazioni sulla proiezione aggiornate

no problems here also with v.buffer.

As for the r.to.vect issue, qgis master (processing too), G7, on both Windows and Linux.

@qgib
Copy link
Contributor Author

qgib commented Oct 26, 2015

Author Name: Paolo Cavallini (@pcav)


It seems a problem with projections (it happened before, probably resurfaced here).

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2015

Author Name: Paolo Cavallini (@pcav)


Checked again, I can confirm it on a clean 2.12 install. Steps to reproduce:

  • open iterative/watersheds.shp from processing training data (link above)
  • rasterize it with Processing>GDAL
  • r.to.vect returns an empty vector, with unrecognised CRS (in Properties>General it shows "Selected CRS(,)", in metadata +proj=utm +zone=30 +ellps=intl +units=m +no_defs)

  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Nov 8, 2015

Author Name: Giovanni Manghi (@gioman)


I cannot confirm the issue, on a clean 2.12 install on both Linux and Windows. See attached screencast.

There are two known issues anyway:

  1. Processing/GRASS tools strips towgs84 parameters from outputs CRSs, creating pratically custom CRSs

#21818

  1. Custom CRSs are not recognized by QGIS the first time a layer is loaded in a project

#20098


  • 9300 was configured as lixo_.mp4
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Nov 9, 2015

Author Name: Giovanni Manghi (@gioman)


Giovanni Manghi wrote:

I cannot confirm the issue, on a clean 2.12 install on both Linux and Windows. See attached screencast.

tested on several other machines (both Windows and Linux) and no issues (no empty result).

@qgib
Copy link
Contributor Author

qgib commented Dec 19, 2015

Author Name: Giovanni Manghi (@gioman)


closing for lack of feedback.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to worksforme

@qgib
Copy link
Contributor Author

qgib commented Dec 19, 2015

Author Name: Paolo Cavallini (@pcav)


Have you tested with the same data? The problem is still present, so it warrants deeper investigation. I'll test with master, please leave it open.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Dec 20, 2015

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Have you tested with the same data?

I had, on both Linux and Windows, with different QGIS and Processing versions, and no issues whatsoever.


  • status_id was changed from Reopened to Feedback
  • resolution was changed from worksforme to

@qgib
Copy link
Contributor Author

qgib commented Dec 20, 2015

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Have you tested with the same data? The problem is still present

anyway if a ticket is in feedback state it is up to the reporter to leave further details and/or do more tests. We have a 15 days reply feedback, and I'm using it to clean a bit the tracker.

@qgib
Copy link
Contributor Author

qgib commented Dec 20, 2015

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Have you tested with the same data? The problem is still present, so it warrants deeper investigation. I'll test with master, please leave it open.

tested again and again no issues on two different OS on two different computers with different QGIS/Processing releases.

Please try again also on other systems to avoid local issues.

There are two issues anyway that are not related to the one described in #21634 (comment)

please do more tests and leave feedback.

@qgib
Copy link
Contributor Author

qgib commented Jan 6, 2016

Author Name: Giovanni Manghi (@gioman)


one last test, on qgis master, both modules on grass 6 and 7, on both linux and windows, no issues.

If you have data that is problematic (not the attached one or the training manual one, that is ok) and given that is not a GRASS problem, please reopen this ticket.

See also #20098 and #21818

that are two separate issues from the apparent described here (Processing/GRASS modules failing)


  • status_id was changed from Feedback to Closed
  • resolution was changed from to not reproducable

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS
Projects
None yet
Development

No branches or pull requests

1 participant