[GRASSLIST:9030] 3D blocks again

Dear all,
we're back after 2 weeks of everyday effort with displaying primitive
3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
already wrote, our only need is to display cubes. Anyhow. Our last try
was with GML files. But independently of input formats the result is :
we are not able to display vertical multipolygons or areas. Only
horizontal objects (multipolygons and area) or line model with no
fills. Please, this is probably our last ask for help : How would be
able to do that ?

Thank you all,

Peter Misovic
Peter Sasvari

Hmm it sounds good, I hoped GRASS could help me but as I see I have to
try another solutions :frowning: Thank you.

Peter

On 11/12/05, Dylan Beaudette <debeaudette@ucdavis.edu> wrote:

On Nov 12, 2005, at 12:37 PM, Ing.Peter Misovic wrote:

> Dear all,
> we're back after 2 weeks of everyday effort with displaying primitive
> 3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
> POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
> already wrote, our only need is to display cubes. Anyhow. Our last try
> was with GML files. But independently of input formats the result is :
> we are not able to display vertical multipolygons or areas. Only
> horizontal objects (multipolygons and area) or line model with no
> fills. Please, this is probably our last ask for help : How would be
> able to do that ?
>
>
> Thank you all,
>
> Peter Misovic
> Peter Sasvari
>
>
>

how about POVRAY ?

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

Actually I meant to say: why not use GRASS->POVRAY

i.e. import your data into GRASS, manipulate it as you see fit. Then export it to POVRAY with v.out.pov . You can then customize the output to render cubes instead of points.

Dylan

On Nov 13, 2005, at 7:32 AM, Ing.Peter Misovic wrote:

Hmm it sounds good, I hoped GRASS could help me but as I see I have to
try another solutions :frowning: Thank you.

Peter

On 11/12/05, Dylan Beaudette <debeaudette@ucdavis.edu> wrote:

On Nov 12, 2005, at 12:37 PM, Ing.Peter Misovic wrote:

Dear all,
we're back after 2 weeks of everyday effort with displaying primitive
3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
already wrote, our only need is to display cubes. Anyhow. Our last try
was with GML files. But independently of input formats the result is :
we are not able to display vertical multipolygons or areas. Only
horizontal objects (multipolygons and area) or line model with no
fills. Please, this is probably our last ask for help : How would be
able to do that ?

Thank you all,

Peter Misovic
Peter Sasvari

how about POVRAY ?

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

On 11/13/05, Dylan Beaudette <dylan@iici.no-ip.org> wrote:

Actually I meant to say: why not use GRASS->POVRAY

i.e. import your data into GRASS, manipulate it as you see fit. Then
export it to POVRAY with v.out.pov . You can then customize the output
to render cubes instead of points.

Dylan

On Nov 13, 2005, at 7:32 AM, Ing.Peter Misovic wrote:

> Hmm it sounds good, I hoped GRASS could help me but as I see I have to
> try another solutions :frowning: Thank you.
>
> Peter
>
>
>
>
> On 11/12/05, Dylan Beaudette <debeaudette@ucdavis.edu> wrote:
>> On Nov 12, 2005, at 12:37 PM, Ing.Peter Misovic wrote:
>>
>>> Dear all,
>>> we're back after 2 weeks of everyday effort with displaying primitive
>>> 3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
>>> POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
>>> already wrote, our only need is to display cubes. Anyhow. Our last
>>> try
>>> was with GML files. But independently of input formats the result is
>>> :
>>> we are not able to display vertical multipolygons or areas. Only
>>> horizontal objects (multipolygons and area) or line model with no
>>> fills. Please, this is probably our last ask for help : How would be
>>> able to do that ?
>>>
>>>
>>> Thank you all,
>>>
>>> Peter Misovic
>>> Peter Sasvari
>>>
>>>
>>>
>>
>> how about POVRAY ?
>>
>>
>>
>> --
>> Dylan Beaudette
>> Soils and Biogeochemistry Graduate Group
>> University of California at Davis
>> 530.754.7341
>>
>>
>
>
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

HI Dylan,
Ok now I have understood what you ment but maybe I could summary our
problem again :

-we would like to server data as following :
POSTGIS -> mapserver for 2D (in future Open3DGIS)
POSTGIS (postgres) -> GRASS for 3D (Open3DGIS is not ready with boxes
now - planned for 0.2)

-Problem : we are not able corretly display box (cube) in NVIZ. We
tried to use GML,POSTGRES,ASCII, 3D shp from ArcView ... instead of
POSTGIS. But with no positive effect. Data are not showed correctly
f.e (no vertical polygons or areas, missing lines etc.).

So there are no correct data to export into POVRAY :((

We really don't know what to do :frowning: My concept was based on PostGIS
(geometrycollection, multipolygons etc.) like data provider for
mapserver (2D) and Grass (3D). My last focus was on GML files
(displayin by VRML) but I'm not able to generate 3d GML file (for
example for import to Grass).

Peter Misovic
Peter Sasvari

Hi Jachym,
this is actually not what I meant but really thank you for your time
and effort. In regard of yor picture, how did you create 3D trees ?
Maybe If I would be able to create block instead of tree it could be
the righ way.

Thank you,
Peter

On 11/13/05, Jachym Cepicky <jachym.cepicky@centrum.cz> wrote:

hi,

I did not follow your discusion, but is this:

    http://les-ejk.cz/img/grass_debian2.png

not what something you are trying to do? (should by trees on dem)

if so, tell me, I'll try to explane how to do this

Jachym

this is simple grass
On Sat, Nov 12, 2005 at 09:37:58PM +0100, Ing.Peter Misovic wrote:
> Dear all,
> we're back after 2 weeks of everyday effort with displaying primitive
> 3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
> POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
> already wrote, our only need is to display cubes. Anyhow. Our last try
> was with GML files. But independently of input formats the result is :
> we are not able to display vertical multipolygons or areas. Only
> horizontal objects (multipolygons and area) or line model with no
> fills. Please, this is probably our last ask for help : How would be
> able to do that ?
>
>
> Thank you all,
>
> Peter Misovic
> Peter Sasvari
>

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brnì
Zemìdìlská 3
613 00 Brno
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Hi Dylan,
In fact I have 3D matrix of points. Nature of data source is table in
postgres/Postgis with columns : x, y, z, the_geom (for 3d point) etc.
X,Y,Z are coordinates of centroid. I need display those centriods like
cubes (or it's better to say cuboids, blocks, not cube) with specific
colour. If it is possible in PovRay do I have to use grass ? Or Did
you mean to use GRASS for generate cubes and there export it into
POVRAY ? Or how did you mean it ?

Thank you very much for your time and effort you spent with this problem.

Peter

On 11/13/05, Dylan Beaudette <dylan@iici.no-ip.org> wrote:

On Nov 13, 2005, at 10:38 AM, Ing.Peter Misovic wrote:

> HI Dylan,
> Ok now I have understood what you ment but maybe I could summary our
> problem again :
>
> -we would like to server data as following :
> POSTGIS -> mapserver for 2D (in future Open3DGIS)
> POSTGIS (postgres) -> GRASS for 3D (Open3DGIS is not ready with boxes
> now - planned for 0.2)
>
> -Problem : we are not able corretly display box (cube) in NVIZ. We
> tried to use GML,POSTGRES,ASCII, 3D shp from ArcView ... instead of
> POSTGIS. But with no positive effect. Data are not showed correctly
> f.e (no vertical polygons or areas, missing lines etc.).
>

Hmmm. I was under the (false?) impression that you had a 3D matrix of
points, that needed to be displayed as cubes. What is the nature of
your input data source? The suggestion to use GRASS--->POVRAY was based
on the assumption that you had 3D point data.

If this is not that case, perhaps something like OpenDX would work?

Cheers,

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

Jachym,
thank you for your reply. I'm currently at work but by 19-20 o'clock I
will be able to try this.

Peter

On 11/14/05, Jachym Cepicky <jachym.cepicky@centrum.cz> wrote:

hi,

trees were made by script, written by my own. in general: it takes
vector points and creates ascii file with 3D-polygons, which is later
imported to grass

there is someone in german mailing list solving some problem, like you:
he wants to visualise houses.

is this:

echo "F 5 1
0 0 0
5 0 0
5 0 5
0 0 5
0 0 0
1 1 # 1
F 5 1
5 0 0
5 5 0
5 5 5
5 0 5
5 0 0
1 1 # 2
F 5 1
0 0 0
0 0 5
0 5 5
0 5 0
0 0 0
1 1 # 3
F 5 1
0 5 0
0 5 5
5 5 5
5 5 0
0 5 0
1 1 # 4"| v.in.ascii -zn out=cube format=standard
g.region vec=cube
r.mapcalc elev=0
d.vect cube
nviz vect=cube elev=elev

example, which would help you?

jachym

On Mon, Nov 14, 2005 at 10:41:57AM +0100, Ing.Peter Misovic wrote:
> Hi Jachym,
> this is actually not what I meant but really thank you for your time
> and effort. In regard of yor picture, how did you create 3D trees ?
> Maybe If I would be able to create block instead of tree it could be
> the righ way.
>
>
> Thank you,
> Peter
>
>
>
> On 11/13/05, Jachym Cepicky <jachym.cepicky@centrum.cz> wrote:
> > hi,
> >
> > I did not follow your discusion, but is this:
> >
> > http://les-ejk.cz/img/grass_debian2.png
> >
> > not what something you are trying to do? (should by trees on dem)
> >
> > if so, tell me, I'll try to explane how to do this
> >
> > Jachym
> >
> >
> > this is simple grass
> > On Sat, Nov 12, 2005 at 09:37:58PM +0100, Ing.Peter Misovic wrote:
> > > Dear all,
> > > we're back after 2 weeks of everyday effort with displaying primitive
> > > 3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
> > > POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
> > > already wrote, our only need is to display cubes. Anyhow. Our last try
> > > was with GML files. But independently of input formats the result is :
> > > we are not able to display vertical multipolygons or areas. Only
> > > horizontal objects (multipolygons and area) or line model with no
> > > fills. Please, this is probably our last ask for help : How would be
> > > able to do that ?
> > >
> > >
> > > Thank you all,
> > >
> > > Peter Misovic
> > > Peter Sasvari
> > >
> >
> > --
> > Jachym Cepicky
> > e-mail: jachym.cepicky@centrum.cz
> > URL: http://les-ejk.cz
> > GPG: http://les-ejk.cz/gnupg_public_key/
> > -----------------------------------------
> > OFFICE:
> > Department of Geoinformation Technologies
> > LDF MZLU v Brnì
> > Zemìdìlská 3
> > 613 00 Brno
> > e-mail: xcepicky@node.mendelu.cz
> > URL: http://mapserver.mendelu.cz
> > Tel.: +420 545 134 514
> >

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brnì
Zemìdìlská 3
613 00 Brno
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Hallo Jachym,
it seems that this is really what we need :slight_smile: Please, can you describe
me format of those coordinates ? Can I add atributes in this file ?
Thank you very much for you help, our project can move on :slight_smile:

Peter Misovic
Peter Sasvari

On 11/14/05, Jachym Cepicky <jachym.cepicky@centrum.cz> wrote:

hi,

trees were made by script, written by my own. in general: it takes
vector points and creates ascii file with 3D-polygons, which is later
imported to grass

there is someone in german mailing list solving some problem, like you:
he wants to visualise houses.

is this:

echo "F 5 1
0 0 0
5 0 0
5 0 5
0 0 5
0 0 0
1 1 # 1
F 5 1
5 0 0
5 5 0
5 5 5
5 0 5
5 0 0
1 1 # 2
F 5 1
0 0 0
0 0 5
0 5 5
0 5 0
0 0 0
1 1 # 3
F 5 1
0 5 0
0 5 5
5 5 5
5 5 0
0 5 0
1 1 # 4"| v.in.ascii -zn out=cube format=standard
g.region vec=cube
r.mapcalc elev=0
d.vect cube
nviz vect=cube elev=elev

example, which would help you?

jachym

On Mon, Nov 14, 2005 at 10:41:57AM +0100, Ing.Peter Misovic wrote:
> Hi Jachym,
> this is actually not what I meant but really thank you for your time
> and effort. In regard of yor picture, how did you create 3D trees ?
> Maybe If I would be able to create block instead of tree it could be
> the righ way.
>
>
> Thank you,
> Peter
>
>
>
> On 11/13/05, Jachym Cepicky <jachym.cepicky@centrum.cz> wrote:
> > hi,
> >
> > I did not follow your discusion, but is this:
> >
> > http://les-ejk.cz/img/grass_debian2.png
> >
> > not what something you are trying to do? (should by trees on dem)
> >
> > if so, tell me, I'll try to explane how to do this
> >
> > Jachym
> >
> >
> > this is simple grass
> > On Sat, Nov 12, 2005 at 09:37:58PM +0100, Ing.Peter Misovic wrote:
> > > Dear all,
> > > we're back after 2 weeks of everyday effort with displaying primitive
> > > 3D geometry - cube. We tried to use many solutions (ASCII, POSTGIS,
> > > POSTGRES, GML ...) but with no effect. As I (and my friend Peter)
> > > already wrote, our only need is to display cubes. Anyhow. Our last try
> > > was with GML files. But independently of input formats the result is :
> > > we are not able to display vertical multipolygons or areas. Only
> > > horizontal objects (multipolygons and area) or line model with no
> > > fills. Please, this is probably our last ask for help : How would be
> > > able to do that ?
> > >
> > >
> > > Thank you all,
> > >
> > > Peter Misovic
> > > Peter Sasvari
> > >
> >
> > --
> > Jachym Cepicky
> > e-mail: jachym.cepicky@centrum.cz
> > URL: http://les-ejk.cz
> > GPG: http://les-ejk.cz/gnupg_public_key/
> > -----------------------------------------
> > OFFICE:
> > Department of Geoinformation Technologies
> > LDF MZLU v Brnì
> > Zemìdìlská 3
> > 613 00 Brno
> > e-mail: xcepicky@node.mendelu.cz
> > URL: http://mapserver.mendelu.cz
> > Tel.: +420 545 134 514
> >

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brnì
Zemìdìlská 3
613 00 Brno
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

In fact I have 3D matrix of points. Nature of data source is table in
postgres/Postgis with columns : x, y, z, the_geom (for 3d point) etc.
X,Y,Z are coordinates of centroid. I need display those centriods like
cubes (or it's better to say cuboids, blocks, not cube) with specific
colour.

Hi,

This is repeating stuff we have already said, but I think the easiest
way to do this given cube centroids is to extend the NVIZ point-shapes
to include cubes along with the existing sphere, diamond, and "X". You
should be able to cut and paste one of the others (ie diamond) then
rename and tweak it. I can't help you with the exact code you need to
change, maybe someone else knows. But I think that is the easiest way.

Hamish

Hallo Hamish,
yes it is repeating stuff because of it's still open. I know that you
have already written about modification of panlel_site.tcl (there is
code only for providing new checkbox and change_marker method calling)
and tweaking of existing symbol. But as I have already written in
[GRASSLIST:8933] editing exising sybol took no effect at all (for
example - BOX). Why ? Because it is source of 2D symbols (for GRASS
GIS manager). Diamond, Sphere and X have no conenction to symbols in
$GISBASE/etc/symbols. We tried to add existing symbol BOX (from
$GISBASE/etc/symbols) but with no effect. We got the answer with hint
that only hacking NVIZ code is the right possible way how to add new
symbol INTO NVIZ tool. Is it more clear now ? NVIZ has no connection
to $GISBASE/etc/symbols. Where are the symbols from NVIZ ? In Mesa ? I
don't know I'm not programmer in language of NVIZ. And actually there
is no time to hack code to provide new symbol for NVIZ by this way.
Therefore I'm (and me friend Peter) trying to find new solutions by
several directions. One of existing possible ways is to use GML or
PovRay. Or like Jachym wrote - ASCI as he illustrated. Or ...I don't
know yet.

That't the reason, why we're repeating our problem. We're developing
Mining system based on OpenSource GIS tools (Mapserver, Grass, Postgis
etc.). We planned to use GRASS for 3D visualization. But we are in
troubles now. Any help , any good or bad possibility we can try to
apply in our system and it could affort final concept for our system.

In short : we compute some geostat. parameters for mining production.
We split main mining unit into small minining units (500 000) - blocks
(based on geostat computing). As I have already written, for every
block X,Y,Z as coordinates of centroid are available; width, length
and height are known. We only need generate those boxes and display
them in 3D. Our main task is find - HOW TO - store them like 3D
objects in PostGIS and import into GRASS - no way (as I know, but I
hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
for my question : Doeas gdal suport 3D GML objects ? etc. etc.

You know, our main work is computing geostat. variables, we thought
build GIS for visualization should not be complicated ...but we are in
troubles now :frowning:

Peter

On 11/15/05, Hamish <hamish_nospam@yahoo.com> wrote:

> In fact I have 3D matrix of points. Nature of data source is table in
> postgres/Postgis with columns : x, y, z, the_geom (for 3d point) etc.
> X,Y,Z are coordinates of centroid. I need display those centriods like
> cubes (or it's better to say cuboids, blocks, not cube) with specific
> colour.

Hi,
D
This is repeating stuff we have already said, but I think the easiest
way to do this given cube centroids is to extend the NVIZ point-shapes
to include cubes along with the existing sphere, diamond, and "X". You
should be able to cut and paste one of the others (ie diamond) then
rename and tweak it. I can't help you with the exact code you need to
change, maybe someone else knows. But I think that is the easiest way.

Hamish

Maybe some description in English could better illustrate what we are
doing in fact.

In some Slovak miming production they're planning open new mining unit
(part of mine planned to be mined out) - block. Our team provide some
geostatistical computing. In regard of results of this computing the
main mining unit (proportions around 1000mx1000mx500m) will be
splitted into micro minining (proportions based on computing ranges)
units with 84 computed parameters. In that range (f.e) 500 000 micro
units (blocks) will be available. In fact we will have coordinates of
centroid (centre), width, height and length of every micro unit + 84
computed parameters available.

What do we have to do with this data ? To visualize them like boxes
with specific colour. My concept were based on PostGIS database. To
have 3d boxes in PostGIS (+ attribute table in postgress based table
and joined view for manipulating) and import them into GRASS/NVIZ and
colorize by some atrribute. For our project doesn't matter how block
could be displayed in GRASS/NVIZ - either like raster or like vector.

Thank you all,

Peter Misovic

On 11/15/05, Ing.Peter Misovic <peter.misovic@gmail.com> wrote:

Hallo Hamish,
yes it is repeating stuff because of it's still open. I know that you
have already written about modification of panlel_site.tcl (there is
code only for providing new checkbox and change_marker method calling)
and tweaking of existing symbol. But as I have already written in
[GRASSLIST:8933] editing exising sybol took no effect at all (for
example - BOX). Why ? Because it is source of 2D symbols (for GRASS
GIS manager). Diamond, Sphere and X have no conenction to symbols in
$GISBASE/etc/symbols. We tried to add existing symbol BOX (from
$GISBASE/etc/symbols) but with no effect. We got the answer with hint
that only hacking NVIZ code is the right possible way how to add new
symbol INTO NVIZ tool. Is it more clear now ? NVIZ has no connection
to $GISBASE/etc/symbols. Where are the symbols from NVIZ ? In Mesa ? I
don't know I'm not programmer in language of NVIZ. And actually there
is no time to hack code to provide new symbol for NVIZ by this way.
Therefore I'm (and me friend Peter) trying to find new solutions by
several directions. One of existing possible ways is to use GML or
PovRay. Or like Jachym wrote - ASCI as he illustrated. Or ...I don't
know yet.

That't the reason, why we're repeating our problem. We're developing
Mining system based on OpenSource GIS tools (Mapserver, Grass, Postgis
etc.). We planned to use GRASS for 3D visualization. But we are in
troubles now. Any help , any good or bad possibility we can try to
apply in our system and it could affort final concept for our system.

In short : we compute some geostat. parameters for mining production.
We split main mining unit into small minining units (500 000) - blocks
(based on geostat computing). As I have already written, for every
block X,Y,Z as coordinates of centroid are available; width, length
and height are known. We only need generate those boxes and display
them in 3D. Our main task is find - HOW TO - store them like 3D
objects in PostGIS and import into GRASS - no way (as I know, but I
hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
for my question : Doeas gdal suport 3D GML objects ? etc. etc.

You know, our main work is computing geostat. variables, we thought
build GIS for visualization should not be complicated ...but we are in
troubles now :frowning:

Peter

On 11/15/05, Hamish <hamish_nospam@yahoo.com> wrote:
> > In fact I have 3D matrix of points. Nature of data source is table in
> > postgres/Postgis with columns : x, y, z, the_geom (for 3d point) etc.
> > X,Y,Z are coordinates of centroid. I need display those centriods like
> > cubes (or it's better to say cuboids, blocks, not cube) with specific
> > colour.
>
>
> Hi,
> D
> This is repeating stuff we have already said, but I think the easiest
> way to do this given cube centroids is to extend the NVIZ point-shapes
> to include cubes along with the existing sphere, diamond, and "X". You
> should be able to cut and paste one of the others (ie diamond) then
> rename and tweak it. I can't help you with the exact code you need to
> change, maybe someone else knows. But I think that is the easiest way.
>
>
> Hamish
>

We got the answer with hint that only hacking NVIZ code is the right
possible way how to add new symbol INTO NVIZ tool.

..

Where are the symbols from NVIZ ? In Mesa ?

They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
wire-frame box objects in 6.1-cvs.

If anyone wants to add more they are made by OpenGL calls, but it is
pretty simple to copy an existing one and modify the copy.
Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.

I also activated a 3D asterisk and gyroscope that were already defined
in the ogsf libs.

(see attached image)

In short : we compute some geostat. parameters for mining production.
We split main mining unit into small minining units (500 000) - blocks
(based on geostat computing). As I have already written, for every
block X,Y,Z as coordinates of centroid are available; width, length
and height are known. We only need generate those boxes and display
them in 3D. Our main task is find - HOW TO - store them like 3D
objects in PostGIS and import into GRASS - no way (as I know, but I
hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
for my question : Doeas gdal suport 3D GML objects ? etc. etc.

Note the above NVIZ icons will probably not be of a known calibrated
scale and you will need to adjust until it looks right.

If you want the boxes to be exactly the correct size (e.g. to use with
3d rasters), you will have to follow the example Jachym posted for
defining 3D 'faces' using v.in.ascii.

The vector ascii format is described here:
http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii

If you want the vector points' boxes to be semi-transparent, you will
have to learn a little OpenGL and edit gsd_objs.c by hand.

Hamish

(attachments)

nviz_box_asterisk.png

Hallo Hamish

On 11/16/05, Hamish <hamish_nospam@yahoo.com> wrote:

> We got the answer with hint that only hacking NVIZ code is the right
> possible way how to add new symbol INTO NVIZ tool.
..
> Where are the symbols from NVIZ ? In Mesa ?

They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
wire-frame box objects in 6.1-cvs.

If anyone wants to add more they are made by OpenGL calls, but it is
pretty simple to copy an existing one and modify the copy.
Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.

I also activated a 3D asterisk and gyroscope that were already defined
in the ogsf libs.

great

(see attached image)

> In short : we compute some geostat. parameters for mining production.
> We split main mining unit into small minining units (500 000) - blocks
> (based on geostat computing). As I have already written, for every
> block X,Y,Z as coordinates of centroid are available; width, length
> and height are known. We only need generate those boxes and display
> them in 3D. Our main task is find - HOW TO - store them like 3D
> objects in PostGIS and import into GRASS - no way (as I know, but I
> hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
> for my question : Doeas gdal suport 3D GML objects ? etc. etc.

Note the above NVIZ icons will probably not be of a known calibrated
scale and you will need to adjust until it looks right.

Yes, OK.

If you want the boxes to be exactly the correct size (e.g. to use with
3d rasters), you will have to follow the example Jachym posted for
defining 3D 'faces' using v.in.ascii.

Yes that's what I want to test as first :slight_smile:

The vector ascii format is described here:
http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii

If you want the vector points' boxes to be semi-transparent, you will
have to learn a little OpenGL and edit gsd_objs.c by hand.

OK.

Hamish

Thank you Hamish and Jachym, first of all I'm going to combine hints
of you both. Nice day.

Peter

Hi Hamish.
In regard of blocks creating we have changed following :
float CubeVertices[8][3] = {
    {-1.0,-1.0,-1.0},
    {1.0,-1.0,-1.0},
    {1.0,1.0,-1.0},
    {-1.0,1.0,-1.0},
    {-1.0,-1.0,1.0},
    {1.0,-1.0,1.0},
    {1.0,1.0,1.0},
    {-1.0,1.0,1.0}
};

as

float CubeVertices[8][3] = {
    {-2.0,-2.0,-1.0},
    {2.0,-2.0,-1.0},
    {2.0,2.0,-1.0},
    {-2.0,2.0,-1.0},
    {-2.0,-2.0,1.0},
    {2.0,-2.0,1.0},
    {2.0,2.0,1.0},
    {-2.0,2.0,1.0}
};

And now it is ok .

Thank you,

Peto

On 11/16/05, Ing.Peter Misovic <peter.misovic@gmail.com> wrote:

Hallo Hamish

On 11/16/05, Hamish <hamish_nospam@yahoo.com> wrote:
> > We got the answer with hint that only hacking NVIZ code is the right
> > possible way how to add new symbol INTO NVIZ tool.
> ..
> > Where are the symbols from NVIZ ? In Mesa ?
>
> They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
> wire-frame box objects in 6.1-cvs.
>
> If anyone wants to add more they are made by OpenGL calls, but it is
> pretty simple to copy an existing one and modify the copy.
> Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.
>
> I also activated a 3D asterisk and gyroscope that were already defined
> in the ogsf libs.

great

> (see attached image)
>
>
> > In short : we compute some geostat. parameters for mining production.
> > We split main mining unit into small minining units (500 000) - blocks
> > (based on geostat computing). As I have already written, for every
> > block X,Y,Z as coordinates of centroid are available; width, length
> > and height are known. We only need generate those boxes and display
> > them in 3D. Our main task is find - HOW TO - store them like 3D
> > objects in PostGIS and import into GRASS - no way (as I know, but I
> > hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
> > for my question : Doeas gdal suport 3D GML objects ? etc. etc.
>
> Note the above NVIZ icons will probably not be of a known calibrated
> scale and you will need to adjust until it looks right.

Yes, OK.

> If you want the boxes to be exactly the correct size (e.g. to use with
> 3d rasters), you will have to follow the example Jachym posted for
> defining 3D 'faces' using v.in.ascii.

Yes that's what I want to test as first :slight_smile:

> The vector ascii format is described here:
> http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii
>
> If you want the vector points' boxes to be semi-transparent, you will
> have to learn a little OpenGL and edit gsd_objs.c by hand.

OK.

>
>
> Hamish
>

Thank you Hamish and Jachym, first of all I'm going to combine hints
of you both. Nice day.

Peter

>
>

Hi,
I thing, v.extrude is ready for testing..

jachym

On Wed, Nov 30, 2005 at 08:43:30AM +0100, Ing.Peter Misovic wrote:

Hi Hamish.
In regard of blocks creating we have changed following :
float CubeVertices[8][3] = {
    {-1.0,-1.0,-1.0},
    {1.0,-1.0,-1.0},
    {1.0,1.0,-1.0},
    {-1.0,1.0,-1.0},
    {-1.0,-1.0,1.0},
    {1.0,-1.0,1.0},
    {1.0,1.0,1.0},
    {-1.0,1.0,1.0}
};

as

float CubeVertices[8][3] = {
    {-2.0,-2.0,-1.0},
    {2.0,-2.0,-1.0},
    {2.0,2.0,-1.0},
    {-2.0,2.0,-1.0},
    {-2.0,-2.0,1.0},
    {2.0,-2.0,1.0},
    {2.0,2.0,1.0},
    {-2.0,2.0,1.0}
};

And now it is ok .

Thank you,

Peto

On 11/16/05, Ing.Peter Misovic <peter.misovic@gmail.com> wrote:
> Hallo Hamish
>
> On 11/16/05, Hamish <hamish_nospam@yahoo.com> wrote:
> > > We got the answer with hint that only hacking NVIZ code is the right
> > > possible way how to add new symbol INTO NVIZ tool.
> > ..
> > > Where are the symbols from NVIZ ? In Mesa ?
> >
> > They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
> > wire-frame box objects in 6.1-cvs.
> >
> > If anyone wants to add more they are made by OpenGL calls, but it is
> > pretty simple to copy an existing one and modify the copy.
> > Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.
> >
> > I also activated a 3D asterisk and gyroscope that were already defined
> > in the ogsf libs.
>
> great
>
> > (see attached image)
> >
> >
> > > In short : we compute some geostat. parameters for mining production.
> > > We split main mining unit into small minining units (500 000) - blocks
> > > (based on geostat computing). As I have already written, for every
> > > block X,Y,Z as coordinates of centroid are available; width, length
> > > and height are known. We only need generate those boxes and display
> > > them in 3D. Our main task is find - HOW TO - store them like 3D
> > > objects in PostGIS and import into GRASS - no way (as I know, but I
> > > hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
> > > for my question : Doeas gdal suport 3D GML objects ? etc. etc.
> >
> > Note the above NVIZ icons will probably not be of a known calibrated
> > scale and you will need to adjust until it looks right.
>
> Yes, OK.
>
> > If you want the boxes to be exactly the correct size (e.g. to use with
> > 3d rasters), you will have to follow the example Jachym posted for
> > defining 3D 'faces' using v.in.ascii.
>
> Yes that's what I want to test as first :slight_smile:
>
> > The vector ascii format is described here:
> > http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii
> >
> > If you want the vector points' boxes to be semi-transparent, you will
> > have to learn a little OpenGL and edit gsd_objs.c by hand.
>
> OK.
>
> >
> >
> > Hamish
> >
>
>
> Thank you Hamish and Jachym, first of all I'm going to combine hints
> of you both. Nice day.
>
> Peter
>
>
>
> >
> >
>

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brnì
Zemìdìlská 3
613 00 Brno
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

For the presentation, here are screenshots :
http://www.minegis.com/temp/blok.png
http://www.minegis.com/temp/blok2.png
http://www.minegis.com/temp/blok3.png
http://www.minegis.com/temp/blok4.png

Peter

On 11/30/05, Ing.Peter Misovic <peter.misovic@gmail.com> wrote:

Hi Hamish.
In regard of blocks creating we have changed following :
float CubeVertices[8][3] = {
    {-1.0,-1.0,-1.0},
    {1.0,-1.0,-1.0},
    {1.0,1.0,-1.0},
    {-1.0,1.0,-1.0},
    {-1.0,-1.0,1.0},
    {1.0,-1.0,1.0},
    {1.0,1.0,1.0},
    {-1.0,1.0,1.0}
};

as

float CubeVertices[8][3] = {
    {-2.0,-2.0,-1.0},
    {2.0,-2.0,-1.0},
    {2.0,2.0,-1.0},
    {-2.0,2.0,-1.0},
    {-2.0,-2.0,1.0},
    {2.0,-2.0,1.0},
    {2.0,2.0,1.0},
    {-2.0,2.0,1.0}
};

And now it is ok .

Thank you,

Peto

On 11/16/05, Ing.Peter Misovic <peter.misovic@gmail.com> wrote:
> Hallo Hamish
>
> On 11/16/05, Hamish <hamish_nospam@yahoo.com> wrote:
> > > We got the answer with hint that only hacking NVIZ code is the right
> > > possible way how to add new symbol INTO NVIZ tool.
> > ..
> > > Where are the symbols from NVIZ ? In Mesa ?
> >
> > They are mostly in lib/ogsf/gsd_objs.c. I have just added cube and
> > wire-frame box objects in 6.1-cvs.
> >
> > If anyone wants to add more they are made by OpenGL calls, but it is
> > pretty simple to copy an existing one and modify the copy.
> > Edit visualization/nviz/scripts/panel_site.tcl to add to the menu.
> >
> > I also activated a 3D asterisk and gyroscope that were already defined
> > in the ogsf libs.
>
> great
>
> > (see attached image)
> >
> >
> > > In short : we compute some geostat. parameters for mining production.
> > > We split main mining unit into small minining units (500 000) - blocks
> > > (based on geostat computing). As I have already written, for every
> > > block X,Y,Z as coordinates of centroid are available; width, length
> > > and height are known. We only need generate those boxes and display
> > > them in 3D. Our main task is find - HOW TO - store them like 3D
> > > objects in PostGIS and import into GRASS - no way (as I know, but I
> > > hope I'm mistaken) ? etc etc ...GML ? I have no answer from GDAL forum
> > > for my question : Doeas gdal suport 3D GML objects ? etc. etc.
> >
> > Note the above NVIZ icons will probably not be of a known calibrated
> > scale and you will need to adjust until it looks right.
>
> Yes, OK.
>
> > If you want the boxes to be exactly the correct size (e.g. to use with
> > 3d rasters), you will have to follow the example Jachym posted for
> > defining 3D 'faces' using v.in.ascii.
>
> Yes that's what I want to test as first :slight_smile:
>
> > The vector ascii format is described here:
> > http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass6/doc/vector/vector.html#ascii
> >
> > If you want the vector points' boxes to be semi-transparent, you will
> > have to learn a little OpenGL and edit gsd_objs.c by hand.
>
> OK.
>
> >
> >
> > Hamish
> >
>
>
> Thank you Hamish and Jachym, first of all I'm going to combine hints
> of you both. Nice day.
>
> Peter
>
>
>
> >
> >
>

In regard of blocks creating we have changed following :
float CubeVertices[8][3] = {
    {-1.0,-1.0,-1.0},
    {1.0,-1.0,-1.0},
    {1.0,1.0,-1.0},
    {-1.0,1.0,-1.0},
    {-1.0,-1.0,1.0},
    {1.0,-1.0,1.0},
    {1.0,1.0,1.0},
    {-1.0,1.0,1.0}
};

as

float CubeVertices[8][3] = {
    {-2.0,-2.0,-1.0},
    {2.0,-2.0,-1.0},
    {2.0,2.0,-1.0},
    {-2.0,2.0,-1.0},
    {-2.0,-2.0,1.0},
    {2.0,-2.0,1.0},
    {2.0,2.0,1.0},
    {-2.0,2.0,1.0}
};

And now it is ok .

from the screenshots,

http://www.minegis.com/temp/blok4.png

I take it this change gives you 1/2 cubes, and isn't needed for the
general case? (ie it is tweaking to get things the way you want it and
isn't a bug)

Hamish

On 12/5/05, Hamish <hamish_nospam@yahoo.com> wrote:

> In regard of blocks creating we have changed following :
> float CubeVertices[8][3] = {
> {-1.0,-1.0,-1.0},
> {1.0,-1.0,-1.0},
> {1.0,1.0,-1.0},
> {-1.0,1.0,-1.0},
> {-1.0,-1.0,1.0},
> {1.0,-1.0,1.0},
> {1.0,1.0,1.0},
> {-1.0,1.0,1.0}
> };
>
> as
>
> float CubeVertices[8][3] = {
> {-2.0,-2.0,-1.0},
> {2.0,-2.0,-1.0},
> {2.0,2.0,-1.0},
> {-2.0,2.0,-1.0},
> {-2.0,-2.0,1.0},
> {2.0,-2.0,1.0},
> {2.0,2.0,1.0},
> {-2.0,2.0,1.0}
> };
>
>
> And now it is ok .

from the screenshots,

> http://www.minegis.com/temp/blok4.png

I take it this change gives you 1/2 cubes, and isn't needed for the
general case? (ie it is tweaking to get things the way you want it and
isn't a bug)

Hamish

Hi Hamish
sorry for long time with no answer - work :frowning:
And I'm sorry but I don't understand your sentence :frowning: What would you
like to write me ? Did I something wrong ? What I wanted to say is
that for now we have 1/2 cubes but our solution will not always use
1/2 cubes. Printscreen and code is exmaple HOW I WAS ABLE TO GET
BLOCKS FROM CUBES BY VERY SIMPLE CODE EDITING.

Please, if you have a time, can you reformat your sentence?

Thank you very much.

Peter