Filling 2D polygons in NVIZ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Filling 2D polygons in NVIZ?

RichardCooper
This post was updated on .
Hi,

It appears that it is not possible to fill 2D polygons in NVIZ in the current version of GRASS 7.

My workaround is summarised below, but I was wondering if someone could suggest a simpler approach.

Overlaying a rasterised vector derived simply from v.to.rast does not give a good display in NVIZ given the topography of the base DEM layer, hence the method below which extracts DN values from the DEM.

Summary:
convert 2D polygon to raster (v.to.rast)
create mask from latter raster
add mask  (r.mask) and create new layer using r.mapcalc extracting cell values from DEM: if( dem,dem,0 )
set colour of new raster using r.colors
in NVIZ set Z position of new layer above DEM (e.g., 100)

Cheers,
Richard
GRASS 7
Version: 57592
Reply | Threaded
Open this post in threaded view
|

Re: Filling 2D polygons NVIZ?

Markus Neteler
On Sun, Sep 8, 2013 at 10:08 AM, RichardC <[hidden email]> wrote:
> Hi,
>
> I was wondering if there are any plans to enable filling of 2D polygons in
> NVIZ.
>
> I'm using GRASS 7 but it appears that this feature currently isn't
> available.


AFAIK it only works with 3D polygons.
Untested: convert your 2D polygons to 3D with z=0?

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Filling 2D polygons NVIZ?

RichardCooper
This post was updated on .
I tend to find that after running v.to.3d the resulting polygons are distorted from the original.

E.g.,

v.to.3d --overwrite input=w001001urban2_rtv_split@PERMANENT output=w001001urban2_rtv_split_3d height=0

Attached images show the results. I've also tried using v.split to see if that helps, but there is no difference.





However, on closer inspection, the areas have not become faces:
Number of points:       0               Number of centroids:  86         |
 |   Number of lines:        0               Number of boundaries: 53274      |
 |   Number of areas:        86              Number of islands:    81         |
 |   Number of faces:        0               Number of kernels:    0          |
 |   Number of volumes:      0               Number of holes:      0          |
 |                                                                            |
 |   Map is 3D:              Yes                                              |
 |   Number of dblinks:      1      
Reply | Threaded
Open this post in threaded view
|

Re: Filling 2D polygons NVIZ?

RichardCooper
I've added a ticket at: http://trac.osgeo.org/grass/ticket/2076

Here's shot of the layer in gvSIG's 3D viewer, so I think may be related to how NVIZ displays 3D polygons...