Opened 13 years ago

Last modified 12 years ago

#1470 closed defect

v.out.ascii with sql where option exports only centroids and not areas — at Version 3

Reported by: marisn Owned by: grass-dev@…
Priority: blocker Milestone: 6.4.3
Component: Vector Version: svn-trunk
Keywords: v.out.ascii Cc: grass-dev@…
CPU: Unspecified Platform: Unspecified

Description (last modified by martinl)

It's not possible to export areas selected by SQL WHERE clause. Example from NC data set. Let's export only lake with CAT=5109: {{{ood v.out.ascii input=lakes@PERMANENT layer=1 output=vbuffer_fail_on_area3 where=cat=5109 format=standard }}} Output vector part:

C  1 1
 627457.82440791 231495.92575519
 1     5109      

Change History (3)

comment:1 by martinl, 13 years ago

Keywords: v.out.ascii added
Milestone: 6.4.3

in reply to:  description ; comment:2 by mlennert, 13 years ago

Replying to marisn:

It's not possible to export areas selected by SQL WHERE clause. Example from NC data set. Let's export only lake with CAT=5109:

> v.out.ascii input=lakes@PERMANENT layer=1 output=vbuffer_fail_on_area3 where=cat=5109 format=standard

Output vector part:

> C  1 1
>  627457.82440791 231495.92575519
>  1     5109      

This is logicial in the sens that only the centroid has a cat=5109. No boundary has this cat. So this would mean implementing a specific algorithm to check which boundary needs to be exported together with this centroid.

As a workaround: v.extract and then v.out.ascii. Maybe this can be coded in a script ?

Moritz

in reply to:  2 comment:3 by martinl, 13 years ago

Description: modified (diff)

Replying to mlennert:

Replying to marisn: This is logicial in the sens that only the centroid has a cat=5109. No boundary has this cat. So this would mean implementing a specific algorithm to check which boundary needs to be exported together with this centroid.

Basically it could be possible. Currently v.out.ascii opens vector map on level 1 (without topology). This would require level 2 (topology). I can imagine special flag which writes out also areas (boundaries and centroids), not only centroids. The problem is that boundaries of adjacent areas will printed twice. I am not sure whether it's a good idea to extend functionality of this module in this direction. Any opinion?

Note: See TracTickets for help on using tickets.