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 have very simple shapefile, which consists of couple of polygons, and I wanted to snap boundaries automatically. Unfortunately qgis doesn't have such function, but grass has according this answer: QGIS :Check Topology

I followed provided walk-through, i.e. I made new grass mapset, then imported shapefile layer from qgis, but when I wanted to apply v.clean.break or v.clean.snap command, I couldn't select input vector map as there was not option to select one (FYI I also did refresh in Browser tab):

enter image description here

Browser shows that there is one, but all values are zero, so I wonder if I made a mistake somewhere:

enter image description here

I then deleted created mapset and closed qgis, then opened grass to do the same task but now by just using grass. I imported shapefile to vector mapset but it's just same issue, it's like mapset is empty or something like that.

I use up to date OSGeo4W environment.

What could be issue here?


Update:

(Tue Dec 11 17:09:11 2012)                                                      
v.in.ogr dsn=C:\Temp\geo\1.shp layer=1 output=x 
Projection of input dataset and current location appear to match
Layer: 1
Counting polygons for 11 features...
Importing map 11 features...
-----------------------------------------------------
Building topology for vector map <x_tmp>...
Registering primitives...
0 primitives registered
0 vertices registered
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: -
Number of isles: -
Building topology for vector map <x>...
Registering primitives...
0 primitives registered
0 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
(Tue Dec 11 17:09:13 2012) Command finished (1 sec)      
share|improve this question
    
Can you post the output from v.in.ogr when you try to import the shapefile? It looks like you're on the right track, maybe something in the output will stand out as the issue. –  HeyOverThere Dec 11 '12 at 16:02
    
I updated question with log. In the meantime I also tried the same with grass-dev version (7.0) and got same result. Shapefile seems valid, I created it with OGR and then did some changes in qgis after which I saved it. Any tool I have for reading SHP files renders it fine. –  zetah Dec 11 '12 at 16:14
add comment

1 Answer

up vote 2 down vote accepted

v.in.ogr is seeing 11 features, but not building any of them, it might not think your polygons are closed. Try converting them to lines, import the lines, and then have GRASS convert the lines to polygons.

share|improve this answer
    
That did the trick :) Thanks –  zetah Dec 11 '12 at 16:47
add comment

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.