Bug report #3650

shapefiles fails to be imported into GRASS mapset with qgis 1.6/trunk under Windows (but import is fine under qgis 1.5)

Added by Giovanni Manghi over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Low
Assignee:Redmine Admin
Category:GRASS
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:duplicate
Crashes QGIS or corrupts data: Copied to github as #:13709

Description

I found a few shapefiles (I'll attach one as exemple) that are not imported into a GRASS mapset under Windows using qgis 1.6/trunk. Using qgis 1.5 the process runs smoothly.

The output window message under QGIS 1.5 says

v.in.ogr -o dsn=C:/Users/gio/Desktop/GRASS/regioes/regioes.shp output=reg

Datum not recognised by GRASS and no parameters found

Over-riding projection check

Layer: regioes

Importing map 109 features...

-----------------------------------------------------

Building topology for vector map ...

Registering primitives...

111 primitives registered

19480 vertices registered

Building areas...

109 areas built

109 isles built

Attaching islands...

Attaching centroids...

Number of nodes: 110

Number of primitives: 111

Number of points: 0

Number of lines: 0

Number of boundaries: 111

Number of centroids: 0

Number of areas: 109

Number of isles: 109

Number of incorrect boundaries: 2

Number of areas without centroid: 109

-----------------------------------------------------

Cleaning polygons, result is not guaranteed!

Building topology for vector map ...

Number of nodes: 110

Number of primitives: 111

Number of points: 0

Number of lines: 0

Number of boundaries: 111

Number of centroids: 0

Number of areas: -

Number of isles: -

-----------------------------------------------------

Break polygons:

-----------------------------------------------------

Remove duplicates:

-----------------------------------------------------

Break boundaries:

-----------------------------------------------------

Remove duplicates:

-----------------------------------------------------

Clean boundaries at nodes:

-----------------------------------------------------

Change dangles to lines:

-----------------------------------------------------

Remove bridges:

-----------------------------------------------------

Building topology for vector map ...

Building areas...

110 areas built

91 isles built

Attaching islands...

Number of nodes: 134

Number of primitives: 211

Number of points: 0

Number of lines: 0

Number of boundaries: 211

Number of centroids: 0

Number of areas: 110

Number of isles: 91

Number of areas without centroid: 110

Layer: regioes

-----------------------------------------------------

-----------------------------------------------------

Building topology for vector map ...

Registering primitives...

262 primitives registered

14879 vertices registered

Building areas...

110 areas built

91 isles built

Attaching islands...

Attaching centroids...

Number of nodes: 243

Number of primitives: 262

Number of points: 0

Number of lines: 0

Number of boundaries: 153

Number of centroids: 109

Number of areas: 110

Number of isles: 91

Number of areas without centroid: 1

-----------------------------------------------------

109 input polygons

Total area: 3.023812e+011 (110 areas)

Overlapping area: 0.000000e+000 (0 areas)

Area without category: 6.103451e+005 (1 areas)
Successfully finished

The output window message under QGIS 1.6 (standalone) says

v.in.ogr -o dsn=C:/Users/gio/Desktop/GRASS/regioes/regioes.shp output=reg2

Datum not recognised by GRASS and no parameters found

Over-riding projection check

Layer: regioes

Importing map 109 features...

-----------------------------------------------------

Building topology for vector map ...

Registering primitives...

111 primitives registered

19480 vertices registered

Building areas...

109 areas built

109 isles built

Attaching islands...

Attaching centroids...

Number of nodes: 110

Number of primitives: 111

Number of points: 0

Number of lines: 0

Number of boundaries: 111

Number of centroids: 0

Number of areas: 109

Number of isles: 109

Number of incorrect boundaries: 2

Number of areas without centroid: 109

-----------------------------------------------------

Cleaning polygons, result is not guaranteed!

Size of 'coor' file differs from value saved in topology file

Please rebuild topology for vector map 

Unable to open topology file for vector map 
Finished with error

The output window message under QGIS trunk (osgeo4w) says

v.in.ogr -o dsn=C:/Users/gio/Desktop/GRASS/regioes/regioes.shp output=reg snap=-1 min_area=0.0001

Datum not recognised by GRASS and no parameters found

Over-riding projection check

Layer: regioes

Default driver / database set to:

driver: dbf

database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/

Importing map 109 features...

-----------------------------------------------------

Building topology for vector map ...

Registering primitives...

111 primitives registered

19480 vertices registered

Building areas...

109 areas built

109 isles built

Attaching islands...

Attaching centroids...

Number of nodes: 110

Number of primitives: 111

Number of points: 0

Number of lines: 0

Number of boundaries: 111

Number of centroids: 0

Number of areas: 109

Number of isles: 109

Number of incorrect boundaries: 2

Number of areas without centroid: 109

-----------------------------------------------------

Cleaning polygons, result is not guaranteed!

Size of 'coor' file differs from value saved in topology file

Please rebuild topology for vector map 

Unable to open topology file for vector map 
Finished with error

regioes_shp.zip (245 KB) Giovanni Manghi, 2011-03-20 01:53 PM

urbano_shp.zip (163 KB) Giovanni Manghi, 2011-03-28 02:21 PM

History

#1 Updated by Giovanni Manghi over 9 years ago

PS

it works fine under linux/trunk

#2 Updated by Markus Neteler over 9 years ago

Is the GRASS version you are using sufficiently new?

#3 Updated by Giovanni Manghi over 9 years ago

Replying to [comment:2 neteler]:

Is the GRASS version you are using sufficiently new?

I can't do much for that, we are speaking of Windows: qgis was installed with the standard osgeo4w/standalone installers (that include GRASS).

#4 Updated by hellik - over 9 years ago

Replying to [comment:3 lutra]:

Replying to [comment:2 neteler]:

Is the GRASS version you are using sufficiently new?

I can't do much for that, we are speaking of Windows: qgis was installed with the standard osgeo4w/standalone installers (that include GRASS).

just tested this shapefile with a standalone WinGRASS-6.4.SVN--1-Setup.exe

the import seems to be ok:

v.in.ogr --verbose dsn=C:\\dl\
egioes_shp\
egioes.shp output=regioesshp          
Datum <unknown> nicht erkannt von GRASS und keine Parameter gefunden.
Die Projektionsinformationen des Eingabedatensatzes und der aktuellen Location scheinen übereinzustimmen.
Verwende die temporäre Vektorkarte <regioesshp_tmp>
Layer: regioes
Zähle Polygone für 109 Objekte...
Distanz der Grenz-Aufteilung in Karteneinheiten: 60196
Importiere 109 Objekte der Karte...
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <regioesshp_tmp>...
Registriere Primitive...
375 Primitive registriert
19744 Vertices registriert
Die Topologie wurde erstellt
Anzahl der Knoten: 374
Anzahl der Primitive: 375
Anzahl der Punkte: 0
Anzahl der Linien: 0
Anzahl der Grenzen: 375
Anzahl der Zentroide: 0
Anzahl der Flächen: -
Anzahl der Inseln: -
-----------------------------------------------------
Säubere Polygone; für das Resultat wird nicht garantiert!
-----------------------------------------------------
Zerlege Polygone:
-----------------------------------------------------
Lösche Doppelte:
-----------------------------------------------------
Zerlege Grenzen:
Überschneidungen:     0
-----------------------------------------------------
Lösche Doppelte:
-----------------------------------------------------
Säubere Grenzen an den Knoten:
-----------------------------------------------------
Ändere Überstände zu Linien:
-----------------------------------------------------
Lösche Brücken:
-----------------------------------------------------
Verbinde Grenzen:
320 Flächengrenzen zusammengefasst
51 neue Flächengrenzen
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <regioesshp_tmp>...
Erzeuge Flächen...
110 Flächen angelegt
91 Inseln angelegt
Füge Inseln hinzu...
Die Topologie wurde erstellt
Anzahl der Knoten: 400
Anzahl der Primitive: 809
Anzahl der Punkte: 0
Anzahl der Linien: 0
Anzahl der Grenzen: 809
Anzahl der Zentroide: 0
Anzahl der Flächen: 110
Anzahl der Inseln: 91
Anzahl der Flächen ohne Zentroid: 110
-----------------------------------------------------
Finde Zentroide der Layer: regioes
-----------------------------------------------------
Schreibe Zentroide:
-----------------------------------------------------
109 Eingabepolygone
Gesamtfläche: 3.02381E+011 (110 Flächen)
Überlappende Fläche: 0 (0 Flächen)
Fläche ohne Kategorie: 610345 (1 Flächen)
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <regioesshp>...
Registriere Primitive...
256 Primitive registriert
14873 Vertices registriert
Erzeuge Flächen...
110 Flächen angelegt
91 Inseln angelegt
Füge Inseln hinzu...
Füge Zentroide hinzu...
Die Topologie wurde erstellt
Anzahl der Knoten: 237
Anzahl der Primitive: 256
Anzahl der Punkte: 0
Anzahl der Linien: 0
Anzahl der Grenzen: 147
Anzahl der Zentroide: 109
Anzahl der Flächen: 110
Anzahl der Inseln: 91
Anzahl der Flächen ohne Zentroid: 1
(Sun Mar 27 17:59:38 2011) Command finished (1 sec)  

I'll try also with osge4w-qgis.

#5 Updated by hellik - over 9 years ago

Replying to [comment:4 hellik]:

I'll try also with osge4w-qgis.

I've tested this also now with osge4w-qgis-trunk (1.7.0-100):

v.in.ogr -o dsn=C:/dl/regioes_shp/regioes.shp output=regioes2 snap=-1 min_area=0.0001

?Datum nicht erkannt von GRASS und keine Parameter gefunden.

?bersteuere die ?berpr?fung der Projektion.

Layer: regioes

Importiere 109 Objekte der Karte...

-----------------------------------------------------

Erstelle Topologie f?r die Vektorkarte ...

Registriere Primitive...

111 Primitive registriert

19480 Vertices registriert 

Erzeuge Fl?chen...

109 Fl?chen angelegt

109 Inseln angelegt

F?ge Inseln hinzu...

F?ge Zentroide hinzu...

Anzahl der Knoten: 110

Anzahl der Primitive: 111

Anzahl der Punkte: 0

Anzahl der Linien: 0

Anzahl der Grenzen: 111

Anzahl der Zentroide: 0

Anzahl der Fl?chen: 109

Anzahl der Inseln: 109

Anzahl inkorrekter Grenzen: 2

Anzahl der Fl?chen ohne Zentroid: 109

-----------------------------------------------------

?S?ubere Polygone; f?r das Resultat wird nicht garantiert!

Erstelle Topologie f?r die Vektorkarte ...

Anzahl der Knoten: 110

Anzahl der Primitive: 111

Anzahl der Punkte: 0

Anzahl der Linien: 0

Anzahl der Grenzen: 111

Anzahl der Zentroide: 0

Anzahl der Fl?chen: -

Anzahl der Inseln: -

-----------------------------------------------------

Zerlege Polygone:

-----------------------------------------------------

L?sche Doppelte:

-----------------------------------------------------

Zerlege Grenzen:

-----------------------------------------------------

L?sche Doppelte:

-----------------------------------------------------

S?ubere Grenzen an den Knoten:

-----------------------------------------------------

?ndere ?berst?nde zu Linien:

-----------------------------------------------------

L?sche Br?cken:

-----------------------------------------------------

Erstelle Topologie f?r die Vektorkarte ...

Erzeuge Fl?chen...

110 Fl?chen angelegt

91 Inseln angelegt

F?ge Inseln hinzu...

Anzahl der Knoten: 134

Anzahl der Primitive: 211

Anzahl der Punkte: 0

Anzahl der Linien: 0

Anzahl der Grenzen: 211

Anzahl der Zentroide: 0

Anzahl der Fl?chen: 110

Anzahl der Inseln: 91

Anzahl der Fl?chen ohne Zentroid: 110

Layer: regioes

-----------------------------------------------------

-----------------------------------------------------

Erstelle Topologie f?r die Vektorkarte ...

Registriere Primitive...

262 Primitive registriert

14879 Vertices registriert 

Erzeuge Fl?chen...

110 Fl?chen angelegt

91 Inseln angelegt

F?ge Inseln hinzu...

F?ge Zentroide hinzu...

Anzahl der Knoten: 243

Anzahl der Primitive: 262

Anzahl der Punkte: 0

Anzahl der Linien: 0

Anzahl der Grenzen: 153

Anzahl der Zentroide: 109

Anzahl der Fl?chen: 110

Anzahl der Inseln: 91

Anzahl der Fl?chen ohne Zentroid: 1

-----------------------------------------------------

109 Eingabepolygone

Gesamtfl?che: 3.023812e+011 (110 Fl?chen)

?berlappende Fl?che: 0.000000e+000 (0 Fl?chen)

Fl?che ohne Kategorien: 6.103451e+005 (1 Fl?chen)
Erfolgreich beendet

also here the import by v.in.ogr works.

#6 Updated by Giovanni Manghi over 9 years ago

also here the import by v.in.ogr works.

it still fail for me with osgeo4w/qgis trunk

v.in.ogr -o dsn=C:/Users/gio/Downloads/regioes_shp/regioes.shp output=regioes_test1 snap=-1 min_area=0.0001

Datum not recognised by GRASS and no parameters found

Over-riding projection check

Layer: regioes

Importing map 109 features...

-----------------------------------------------------

Building topology for vector map ...

Registering primitives...

111 primitives registered

19480 vertices registered

Building areas...

109 areas built

109 isles built

Attaching islands...

Attaching centroids...

Number of nodes: 110

Number of primitives: 111

Number of points: 0

Number of lines: 0

Number of boundaries: 111

Number of centroids: 0

Number of areas: 109

Number of isles: 109

Number of incorrect boundaries: 2

Number of areas without centroid: 109

-----------------------------------------------------

Cleaning polygons, result is not guaranteed!

Size of 'coor' file differs from value saved in topology file

Please rebuild topology for vector map 

Unable to open topology file for vector map 
Finished with error

#7 Updated by Giovanni Manghi over 9 years ago

I played around a bit more: the attached vector is always imported with no problems if I use the qgis/GRASS shell or if I launch the v.in.ogr GRASS GUI from the qgis/GRASS shell.

If I use the v.in.ogr qgis GUI I still hit the above problems (even not using snap=-1 and min_area=0.0001). Funny thing is that if I keep trying (actually I have to change the output map name, because of #3646 vectors cannot be deleted, then not even overwritten) at the 2nd/3rd try it doesn't stop at

-----------------------------------------------------

Cleaning polygons, result is not guaranteed!

Size of 'coor' file differs from value saved in topology file

Please rebuild topology for vector map 

Unable to open topology file for vector map 
Finished with erro

but this result usually in a freeze/crash - as per #3648 - before showing the "successfully finished" message (but the process has finished, see https://trac.osgeo.org/qgis/ticket/3648#comment:6 ).

I attach another vector that show the same "symptoms".

I'll appreciate if someone other than me and hellik can give it a try.

I'm using QGIS trunk/osgeo4w under Seven 32/64 bit.

#8 Updated by hellik - over 9 years ago

Replying to [comment:7 lutra]:

I attach another vector that show the same "symptoms".

tested the urbano-shapefile in a WinVista32 box with WinGRASS-6.4.SVN--1-Setup.exe and osgeo4w-qgis-trunk 1.7.0-106

I've tried in about 30 different qgis-sessions with different command within qgis (v.in.ogr, v.in.ogr.qgis, grass-shell, etc.), the urbano-shapefile is every time imported without any problem.

Helmut

#9 Updated by Paolo Cavallini over 9 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Most likely a duplicate of #3364 and #3648

Also available in: Atom PDF