[QGIS-trac] [Quantum GIS] #1095: 3-D GRASS line vectors from r.contour - Cant query or identify the lines, but can label the attributes

Quantum GIS qgis at qgis.org
Mon May 19 11:40:59 EDT 2008


#1095: 3-D GRASS line vectors from r.contour - Cant query or identify the lines,
but can label the attributes
---------------------------------------------------+------------------------
   Reporter:  dadudeman                            |              Owner:  nobody     
       Type:  defect                               |             Status:  new        
   Priority:  major: does not work as expected     |          Milestone:  Version 1.0
  Component:  Vectors                              |            Version:  HEAD       
   Keywords:  3D line vector, cant query identify  |   Platform_version:  Kubuntu 7.1
   Platform:  Linux                                |           Must_fix:  Yes        
Status_info:  0                                    |  
---------------------------------------------------+------------------------
 I noticed this in previous releases too.  When I use r.contour in GRASS to
 create contour lines from a GRASS raster, from what I gathered they are 3D
 lines, which I cannot identify or query in QGIS.  I can only label the
 "level" attribute, which gets the elevation assignment from r.contour.

 I originally submitted this to the GRASS mailing list because of ambiguity
 on the "level" terminology, but after some testing, Moritz found that it
 is a QGIS issue.  In GRASS, I can query/identify the lines and get the
 values in the output screen.  If I convert the GRASS vectors to a
 shapefile, the attributes are written out ok and I can then query them in
 QGIS.

 Here is the correspondence from the GRASS list, and how Moritz determined
 the 3D line as an issue:

 On 16/05/08 17:26, M S wrote:

     Hi everyone.
     I had generated some contours from a DEM with r.contour.  In the
 resulting vector contour map, I get cat and level, where level is the
 elevation value.  I must be confused with the level terminology, because I
 thought levels pertained to topological (2) or non-topological data (1).
 However, in r.contour output, "level attribute" corresponds with the
 contour elevation.


 In GRASS the same words sometimes have different meanings according to
 context. Generally for historical reasons...


     Regardless, I'm able to query the lines in GRASS monitor to get the
 cat and level (elevation) values for the contour lines, but in QGIS I'm
 unable to query or identify the features.  In QGIS, I am able to label the
 lines on the "level" item though.

     I refrained from cross posting to QGIS list, because it seems like
 something I'm not understanding in GRASS vector model.

     Any ideas why the features are (repeatably) unidentifiable in QGIS,
 but are viewed and labeled without issue?


 No idea, but I can confirm with the North Carolina demo data:

 - elev_contour_3m: no data found
 - any other line layer (streams, busroutesall, etc): I get the relevant
 info

 After a bit of testing, it seems to me that this is due to the fact that
 the contour lines have 3D points as vertexes, i.e.:

 v.out.ascii elev_contour_3m format=standard

 L  309 1
  644845.39132067 228495       58
  644850.5257363 228485       58
  644855       228476.80568172 58
  644856.10080552 228475       58


 whereas the others have 2D points as vertexes, i.e.:

 v.out.ascii busroutesall format=standard

 L  40 1
  638759.35668041 224267.86790137
  638748.56434918 224206.16089597
  638738.04094476 224149.69241332
  638701.95659054 224155.1582149
  638712.48508636 224219.60539241
  638727.41956522 224217.30778103
  638737.10320251 224271.95933017


 So it seems to me that this is a flaw in QGIS' handling of this type of
 data.

 Moritz

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1095>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list