[GRASS-dev] NVIZ problem with 3D polygons

Bonjour,

I’ve also posted this on the GRASS-users mailist but since I didn’t receive an answer, I thought I might try this one.

I am having problems to see vectors I have added height to with v.extrude . The trick is that I am actually using the e.g. given in NETELER, M and H. MITASOVA Open Source GIS a GRASS GIS Approach with the North Carolina sample data. So in theory, this example should really be working…

Here is what I did

g.region rast=el_D792_6m -p

v.extract P079215 out=bldg_resid_a where=“layer=‘BLDG_RESID_BL’”
v.extract P079215 out=bldg_cmcl_a where=“layer=‘BLDG_COMMER_BL’”

v.extrude -t bldg_resid_a out=bldg_resid_a_3d height=10 elev=el_D792_6m
v.extrude -t bldg_cmcl_a out=bldg_cmcl_a_3d height=15 elev=el_D792_6m

g.region rural_1m -p
nviz elev_lid792_1m col=ortho_2001_t792_1m vect=bldg_resid_a_3d,bldg_cmcl_a_3d

I am using Grass 6.4.1 with the python GUI on Windows 7

Now the infamous result is just some line on what should be the height of the building, like if NVIZ read it as lines rather than 3D surface…

the result

I’ve encountered also this problem when I tried to visualised a DXF file in NVIZ. The windmill shows up but in broken lines which is no good to me.

Thank you for your help, I’m very new to GIS and Open Source, and I must admit I don’t know where to find the ressources to help…

Delphine

On Thu, Aug 11, 2011 at 11:30 AM, del cadarn <del_cadarn@hotmail.com> wrote:

Bonjour,

I’ve also posted this on the GRASS-users mailist but since I didn’t receive an answer, I thought I might try this one.

Sorry, I overlooked it.

I am having problems to see vectors I have added height to with v.extrude . The trick is that I am actually using the e.g. given in NETELER, M and H. MITASOVA Open Source GIS a GRASS GIS Approach with the North Carolina sample data. So in theory, this example should really be working…

Thanks :slight_smile: But there was an error in that part of the book:

http://www.grassbook.org/errata_menu3rd.php

Here is what I did

g.region rast=el_D792_6m -p

v.extract P079215 out=bldg_resid_a where=“layer=‘BLDG_RESID_BL’”
v.extract P079215 out=bldg_cmcl_a where=“layer=‘BLDG_COMMER_BL’”

Here the step to change the vector type was omitted in the book example.

v.info bldg_resid_a -t
nodes=14
points=0
lines=11
boundaries=0
centroids=0
areas=0
islands=0
faces=0
kernels=0
primitives=11
map3d=1

→ no boundaries but lines only.

So you need to perform here:

v.type bldg_resid_a out=bldg_resid_bnd type=line,boundary
v.centroids bldg_resid_bnd out=bldg_resid_pol
v.type bldg_cmcl_a out=bldg_cmcl_bnd type=line,boundary
v.centroids bldg_cmcl_bnd out=bldg_cmcl_pol

add height of the building (use new input maps)

v.extrude -t bldg_resid_pol out=bldg_resid_a_3d height=10
elev=el_D792_6m
v.extrude -t bldg_cmcl_pol out=bldg_cmcl_a_3d height=15
elev=el_D792_6m

verify

v.info -t bldg_resid_a_3d | grep faces
faces=36

v.info -t bldg_cmcl_a_3d | grep faces
faces=55

g.region rural_1m -p

nviz elev_lid792_1m col=ortho_2001_t792_1m vect=bldg_resid_a_3d,bldg_cmcl_a_3dI’ve encountered also this problem when I tried to visualised a DXF file in NVIZ. The windmill shows up but in broken lines which is no good to me.

… now you see the buildings nicely.

Thank you for your help, I’m very new to GIS and Open Source, and I must admit I don’t know where to find the ressources to help…

It will be the same problem with solution to be applied from above.

Hope this helps,
Markus


http://www.grassbook.org/neteler/

Dear Mr. Neteler,

thank you for your input (and for your book about Grass, without which I don’t know how I would approach Grass… actually I’m borrowing my employer’s copy so if you have any free ones floating around… :wink: ).

Your solution worked for the v.extrude buildings… brilliant.
However it doesn’t work for the imported DXF, here is a description of the details
| Number of points: 0 Number of areas: 0 |
| Number of lines: 0 Number of islands: 0 |
| Number of boundaries: 0 Number of faces: 53516 |
| Number of centroids: 0 Number of kernels: 0 |
| |
| Map is 3D: Yes |
| Number of dblinks: 1

Do I need to apply v.type on another categorie?

Thank you,

DelphineJB


From: neteler@osgeo.org
Date: Tue, 16 Aug 2011 11:57:20 +0200
Subject: Re: [GRASS-dev] NVIZ problem with 3D polygons
To: del_cadarn@hotmail.com
CC: grass-dev@lists.osgeo.org

On Thu, Aug 11, 2011 at 11:30 AM, del cadarn <del_cadarn@hotmail.com> wrote:

Bonjour,

I’ve also posted this on the GRASS-users mailist but since I didn’t receive an answer, I thought I might try this one.

Sorry, I overlooked it.

I am having problems to see vectors I have added height to with v.extrude . The trick is that I am actually using the e.g. given in NETELER, M and H. MITASOVA Open Source GIS a GRASS GIS Approach with the North Carolina sample data. So in theory, this example should really be working…

Thanks :slight_smile: But there was an error in that part of the book:

http://www.grassbook.org/errata_menu3rd.php

Here is what I did

g.region rast=el_D792_6m -p

v.extract P079215 out=bldg_resid_a where=“layer=‘BLDG_RESID_BL’”
v.extract P079215 out=bldg_cmcl_a where=“layer=‘BLDG_COMMER_BL’”

Here the step to change the vector type was omitted in the book example.

v.info bldg_resid_a -t
nodes=14
points=0
lines=11
boundaries=0
centroids=0
areas=0
islands=0
faces=0
kernels=0
primitives=11
map3d=1

→ no boundaries but lines only.

So you need to perform here:

v.type bldg_resid_a out=bldg_resid_bnd type=line,boundary
v.centroids bldg_resid_bnd out=bldg_resid_pol
v.type bldg_cmcl_a out=bldg_cmcl_bnd type=line,boundary
v.centroids bldg_cmcl_bnd out=bldg_cmcl_pol

add height of the building (use new input maps)

v.extrude -t bldg_resid_pol out=bldg_resid_a_3d height=10
elev=el_D792_6m
v.extrude -t bldg_cmcl_pol out=bldg_cmcl_a_3d height=15
elev=el_D792_6m

verify

v.info -t bldg_resid_a_3d | grep faces
faces=36

v.info -t bldg_cmcl_a_3d | grep faces
faces=55

g.region rural_1m -p

nviz elev_lid792_1m col=ortho_2001_t792_1m vect=bldg_resid_a_3d,bldg_cmcl_a_3dI’ve encountered also this problem when I tried to visualised a DXF file in NVIZ. The windmill shows up but in broken lines which is no good to me.

… now you see the buildings nicely.

Thank you for your help, I’m very new to GIS and Open Source, and I must admit I don’t know where to find the ressources to help…

It will be the same problem with solution to be applied from above.

Hope this helps,
Markus


http://www.grassbook.org/neteler/

On Thu, Aug 25, 2011 at 10:18 AM, del cadarn <del_cadarn@hotmail.com> wrote:
...

Your solution worked for the v.extrude buildings... brilliant.

excellent!

However it doesn't work for the imported DXF, here is a description of the
details
| Number of points: 0 Number of areas: 0 |
| Number of lines: 0 Number of islands: 0 |
| Number of boundaries: 0 Number of faces: 53516 |
| Number of centroids: 0 Number of kernels: 0 |
| |
| Map is 3D: Yes |
| Number of dblinks: 1

Please also report the top/bottom output (B and T).

Do I need to apply v.type on another categorie?

In this case no since you have already faces.

Markus

Dear Mr. Neteler,

here are the full details…

±---------------------------------------------------------------------------+
| Layer: turbine |
| Mapset: user1 |
| Location: nc_spm_08 |
| Database: \mygrass |
| Title: turbine |
| Map scale: 1:2400 |
| Map format: native |
| Name of creator: Del Jasmin-Bélisle |
| Organization: GRASS Development Team |

Source date:
Type of Map: vector (level: 2)
Number of points: 0 Number of areas: 0
Number of lines: 0 Number of islands: 0
Number of boundaries: 0 Number of faces: 53516
Number of centroids: 0 Number of kernels: 0
Map is 3D: Yes
Number of dblinks: 1
Projection: Lambert Conformal Conic
N: 142.936628 S: -142.936628
E: 20.646225 W: -20.646225
B: -192.046085 T: 192.046097
Digitization threshold: 0
Comments:

Thank you for your help,

Delphine

From: neteler@osgeo.org
Date: Thu, 25 Aug 2011 15:47:24 +0200
Subject: Re: [GRASS-dev] NVIZ problem with 3D polygons
To: del_cadarn@hotmail.com
CC: grass-dev@lists.osgeo.org

On Thu, Aug 25, 2011 at 10:18 AM, del cadarn del_cadarn@hotmail.com wrote:

Your solution worked for the v.extrude buildings… brilliant.

excellent!

However it doesn’t work for the imported DXF, here is a description of the
details
| Number of points: 0 Number of areas: 0 |
| Number of lines: 0 Number of islands: 0 |
| Number of boundaries: 0 Number of faces: 53516 |
| Number of centroids: 0 Number of kernels: 0 |
| |
| Map is 3D: Yes |
| Number of dblinks: 1

Please also report the top/bottom output (B and T).

Do I need to apply v.type on another categorie?

In this case no since you have already faces.

Markus