[GRASS-dev] 3D DXF output: howto?

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

2. Is it possible to output 3D vector points as 3D DXF?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Best,

Benjamin

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Benjamin Ducke wrote:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.extrude?

2. Is it possible to output 3D vector points as 3D DXF?

Dunno. Have you tried and it failed?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Maciek

Hi Benjamin,

(I have taken out grass-dev to avoid too much cross-posting)

Benjamin Ducke wrote on 11/16/2006 09:37 AM:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.drape will do that for you.

2. Is it possible to output 3D vector points as 3D DXF?

v.out.dxf seems to set 3D dxf vertices. Doesn't it work?

Markus

OK, v.drape worked for me, though I find it a little annoying
that I have to first convert the elevation attribute to a
raster, than use that to grab 3D coordinates off it.

I was hoping there might be a more elegant way to just copy
the elevation attribute into the Z coordinate and create
and thus convert a 3D points map to 3D directly.

I can confirm that 3D dxf export works fine, at least for points.

Thanks a lot for the hint,

Benjamin

Markus Neteler wrote:

Hi Benjamin,

(I have taken out grass-dev to avoid too much cross-posting)

Benjamin Ducke wrote on 11/16/2006 09:37 AM:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.drape will do that for you.

2. Is it possible to output 3D vector points as 3D DXF?

v.out.dxf seems to set 3D dxf vertices. Doesn't it work?

Markus

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Ah, now I got it... So, alternatively you can do:
with
  v.to.db option=coor ...
you could upload the x and y values to the attribute table,
then re-create a map with
  v.in.db ...

Markus

Benjamin Ducke wrote on 11/16/2006 11:48 AM:

OK, v.drape worked for me, though I find it a little annoying
that I have to first convert the elevation attribute to a
raster, than use that to grab 3D coordinates off it.

I was hoping there might be a more elegant way to just copy
the elevation attribute into the Z coordinate and create
and thus convert a 3D points map to 3D directly.

I can confirm that 3D dxf export works fine, at least for points.

Thanks a lot for the hint,

Benjamin

Markus Neteler wrote:

Hi Benjamin,

(I have taken out grass-dev to avoid too much cross-posting)

Benjamin Ducke wrote on 11/16/2006 09:37 AM:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.drape will do that for you.

2. Is it possible to output 3D vector points as 3D DXF?

v.out.dxf seems to set 3D dxf vertices. Doesn't it work?

Markus

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Thanks, that's a very interesting hint.

Benjamin

Markus Neteler wrote:

Ah, now I got it... So, alternatively you can do:
with
  v.to.db option=coor ...
you could upload the x and y values to the attribute table,
then re-create a map with
  v.in.db ...
Markus

Benjamin Ducke wrote on 11/16/2006 11:48 AM:

OK, v.drape worked for me, though I find it a little annoying
that I have to first convert the elevation attribute to a
raster, than use that to grab 3D coordinates off it.

I was hoping there might be a more elegant way to just copy
the elevation attribute into the Z coordinate and create
and thus convert a 3D points map to 3D directly.

I can confirm that 3D dxf export works fine, at least for points.

Thanks a lot for the hint,

Benjamin

Markus Neteler wrote:

Hi Benjamin,

(I have taken out grass-dev to avoid too much cross-posting)

Benjamin Ducke wrote on 11/16/2006 09:37 AM:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.drape will do that for you.

2. Is it possible to output 3D vector points as 3D DXF?

v.out.dxf seems to set 3D dxf vertices. Doesn't it work?

Markus

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Benjamin,

Just one warning. About 1-2 years ago I too looked at using blender an I discovered a problem. Blender at that time could only work withe coordinates (x,y, and z ) in the range of +/-10000.00. Which is a problem for most realworld coordinates.

Does this limitation still exist?
Do your coordinates exceed this range?

Good luck,

Phillip Allen

Sent via BlackBerry from Cingular Wireless

-----Original Message-----
From: Benjamin Ducke <benjamin.ducke@ufg.uni-kiel.de>
Date: Thu, 16 Nov 2006 09:37:01
To:GRASS user list <grassuser@grass.itc.it>, GRASS devel <grass-dev@grass.itc.it>
Subject: [GRASS-user] 3D DXF output: howto?

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

2. Is it possible to output 3D vector points as 3D DXF?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Best,

Benjamin

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

I just loaded a few dozen points with coordinates around 600000
into blender and it worked.
I was able to load the points, select them and zoom into them.
However, the -1000 to +1000 range is still present in some menu widgets
and the navigation outside of it seems difficult.
I also experimented with importing 43.000+ points and after ca. 10
minutes of waiting for the result, I killed the program.

Anyway, my coordinates are local coordinates with a very small range, so I will not hit that limit.

Best,

Benjamin

paallen@attglobal.net wrote:

Benjamin,

Just one warning. About 1-2 years ago I too looked at using blender an I discovered a problem. Blender at that time could only work withe coordinates (x,y, and z ) in the range of +/-10000.00. Which is a problem for most realworld coordinates.

Does this limitation still exist?
Do your coordinates exceed this range?

Good luck,

Phillip Allen

Sent via BlackBerry from Cingular Wireless

-----Original Message-----
From: Benjamin Ducke <benjamin.ducke@ufg.uni-kiel.de>
Date: Thu, 16 Nov 2006 09:37:01 To:GRASS user list <grassuser@grass.itc.it>, GRASS devel <grass-dev@grass.itc.it>
Subject: [GRASS-user] 3D DXF output: howto?

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

2. Is it possible to output 3D vector points as 3D DXF?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Best,

Benjamin

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

That's it! Just what I was looking for. v.out.dxf also seems
to work for 3d points.
There is so much stuff in GRASS, but you have to know where to look ...

Maciej Sieczka wrote:

Benjamin Ducke wrote:

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

v.extrude?

2. Is it possible to output 3D vector points as 3D DXF?

Dunno. Have you tried and it failed?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Maciek

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Benjamin,

Another useful tool for n-dimensional visualization is Paraview. It will
read GRASS vector or raster files exported to vtk format.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Benjamin Ducke <benjamin.ducke@ufg.uni-kiel.de>
Date: Thu, 16 Nov 2006 15:51:20 +0100
Cc: GRASS user list <grassuser@grass.itc.it>
Subject: Re: [GRASS-user] 3D DXF output: howto?

I just loaded a few dozen points with coordinates around 600000
into blender and it worked.
I was able to load the points, select them and zoom into them.
However, the -1000 to +1000 range is still present in some menu widgets
and the navigation outside of it seems difficult.
I also experimented with importing 43.000+ points and after ca. 10
minutes of waiting for the result, I killed the program.

Anyway, my coordinates are local coordinates with a very small range, so
I will not hit that limit.

Best,

Benjamin

paallen@attglobal.net wrote:

Benjamin,

Just one warning. About 1-2 years ago I too looked at using blender an I
discovered a problem. Blender at that time could only work withe coordinates
(x,y, and z ) in the range of +/-10000.00. Which is a problem for most
realworld coordinates.

Does this limitation still exist?
Do your coordinates exceed this range?

Good luck,

Phillip Allen

Sent via BlackBerry from Cingular Wireless

-----Original Message-----
From: Benjamin Ducke <benjamin.ducke@ufg.uni-kiel.de>
Date: Thu, 16 Nov 2006 09:37:01
To:GRASS user list <grassuser@grass.itc.it>, GRASS devel
<grass-dev@grass.itc.it>
Subject: [GRASS-user] 3D DXF output: howto?

Hi everyone,

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Two questions arise:

1. My GRASS vector points are 2D + elevation attribute. Is it possible
to map the elevation attribute to a Z coordinate and create a 3D map?

2. Is it possible to output 3D vector points as 3D DXF?

If not, maybe someone could detail on what needs to be done and I will
try and hack up something.

Best,

Benjamin

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Benjamin Ducke wrote:

I am currently trying to get some 3D points out of GRASS and into a
3D modeller (blender.org) fur further processing.

Can blender load VTK format? (v.out.vtk)
or POV? (v.out.pov)

v.out.dxf will export 3D:
if (ltype & GV_POINTS) {
    dxf_point(layer, Points->x[0], Points->y[0], Points->z[0]);

Benjamin:

OK, v.drape worked for me, though I find it a little annoying
that I have to first convert the elevation attribute to a
raster, than use that to grab 3D coordinates off it.

I was hoping there might be a more elegant way to just copy
the elevation attribute into the Z coordinate and create
and thus convert a 3D points map to 3D directly.

hmph, that isn't so good. we should add a column= option to optionally
take the value from a column in the input vector. (even though this has
little to do with a "drape")

I've tested making a wish in the new bug tracker:
http://wald.intevation.org/tracker/index.php?func=detail&aid=237&group_id=21&atid=182

Markus:

Ah, now I got it... So, alternatively you can do:
with
v.to.db option=coor ...
you could upload the x and y values to the attribute table,
then re-create a map with
v.in.db ...

another method:
v.out.ascii.db (from the wiki add-ons page)
v.in.ascii -z z=

question for devels: why doesn't z>0 option trigger the -z flag
automatically?

Hamish

Maciek:

> v.extrude?

of course! v.drape wish canceled.

Benjamin wrote:

That's it! Just what I was looking for. v.out.dxf also seems
to work for 3d points.
There is so much stuff in GRASS, but you have to know where to look
...

If you find a big hole in the documentation, please add to the Wiki
(I've just added v.extrude,v.drape to the "3D help" page), or consider
writing an article about what you did for the GRASS Newsletter.

http://grass.gdf-hannover.de/wiki/Help_with_3D

Phillip Allen:

Just one warning. About 1-2 years ago I too looked at using blender
an I discovered a problem. Blender at that time could only work withe
coordinates (x,y, and z ) in the range of +/-10000.00. Which is a
problem for most realworld coordinates.

v.transform can apply false eastings and northings to get the points
within range. see also the GeoVRML project, which was built to overcome
this sort of limitation in the VRML format (http://geovrml.org)

Hamish

I am currently teaching a course on GIS and vizualization
in archaeology. A few students are working on getting
a small DEM (as 3D points) into blender and modifying it there.
In a next step, we will integrate more site data and eventually
also landscape data using the vterrain.org tools.
As soon as my students have something interesting worked out,
I will ask them to take a few screenshots and write a small
report for the Wiki or maybe the GRASS newsletter.

Hamish wrote:

Benjamin Ducke wrote:

I just loaded a few dozen points with coordinates around 600000
into blender and it worked.

screenshots would be appreciated!

Hamish

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Il giorno gio, 16/11/2006 alle 12.49 -0700, Michael Barton ha scritto:

Benjamin,

Another useful tool for n-dimensional visualization is Paraview. It
will
read GRASS vector or raster files exported to vtk format.

I'd like to suggest also VisIt http://www.llnl.gov/visit/home.html
It's under a BSD license and it can read GDAL formats (so maybe also
GRASS files w/o having to convert) and VTK.

I've never tried it but it sounds promising.

Let us know if someone happens to use it.

Best regards

Stefano

--
Stefano Costa
http://www.iosa.it Open Archaeology
http://list.iosa.it International Mailing List
Jabber: steko@jabber.linux.it

im trying to access to a mapset... but when i select the gis database path and after the mapset name grass say: "Warning: "PERMANENT" is not a valid mapset"... what could it be? any suggestion?

Thanks
Luca

Luca Penasa wrote:

im trying to access to a mapset... but when i select the gis database
path and after the mapset name grass say: "Warning: "PERMANENT" is not
a valid mapset"... what could it be? any suggestion?

missing WIND file? filename converted to lowercase?

copy DEFAULT_WIND -> WIND

Hamish

There is also nothing that is as easily fooled :wink:

But seriously: I am currently trying to switch completely
to open source components for teaching my classes.
I have seen some amazing things that blender and vterrain.org
can do and frankly, I am so sick and tired of ArcGIS et al.,
the random crashes, the format incompatibilities, the lack
of * real * functionality ...

Btw. would someone be interested in joining me to publish a list of the
most appaling ArcGIS annoyances on the GRASS Wiki?
I could add some "fun facts" ...

Benjamin

Hamish wrote:

Benjamin Ducke wrote:

I am currently teaching a course on GIS and vizualization
in archaeology. A few students are working on getting
a small DEM (as 3D points) into blender and modifying it there.
In a next step, we will integrate more site data and eventually
also landscape data using the vterrain.org tools.
As soon as my students have something interesting worked out,
I will ask them to take a few screenshots and write a small
report for the Wiki or maybe the GRASS newsletter.

sounds like a very cool class project. visualization is so important for
understanding.. there is no computerized signal processor that comes
anywhere close to the human eye for pattern recognition!

Hamish

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

Cool. Here are some from my grab bag:

Ever tried to export a shape format point map to DXF using ArcCatalog?
It's crazy: the input file cannot be placed in a path that has a
space in it (!) and none of the folders leading up to it or the
file name itself can have more than 7 (!!) characters. Now, try to
conform with this when you are in a networked environment and users
cannot directly access any drive letter! But it doesn't matter anyway,
because even if you get past this filenaming barrier, the exporter
will just fail miserably, without an error message or any result file!
I wonder how many more tools in the ArcToolbox fail in this way. My
nerves are just too thin to try them all, currently.

Did you know that Spatial Analyst cannot handle maps that are in a
customized projection? I found this out the hard way when I used a
"local" projection for one of my excavation sites. The only hint
was a report of the same problem on a Durch site. Solution: get rid
of the .prj file and ignore all of Arc's nagging. It's ridiculous.

But my all time favourite is the warning in the dialogue for exporting
a raster map's data into ESRI(!) raster formats in ArcMap 9!
What? A software that cannot correctly export data into its OWN formats?
How thick can it get?

Benjamin

Hamish wrote:

Benjamin Ducke wrote:

I could add some "fun facts" ...

my favorite is one, as suggesed on a blog somewhere (slashgeo.org
article?).

go to esri's website & "contact us" page. Try clicking the get
directions to our headquaters link (Readlands, California) which takes
you to an ArcIMS map server.

While you are waiting, open up a new tab and plug the address into
google maps or your favorite UMN MapServer or PyWPS site, make some
coffee, send some emails...

By now you can give up and close the Arc map, it never loads.
(For me, the Arc site is totally non-functional, which is mostly my
experience with all ArcIMS servers I've ever had to use. And people pay
huge amounts for broken software because of the comfortable name. I
don't get it.)

Hamish

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This would be interesting, especially if you could compare these AV
oddities with the equivalent grass/qgis equivalents.
good comparative advertisment
Looking forward to it.
pc

Benjamin Ducke ha scritto:

Btw. would someone be interested in joining me to publish a list of the
most appaling ArcGIS annoyances on the GRASS Wiki?
I could add some "fun facts" ...

Benjamin

- --
Paolo Cavallini
email+jabber: cavallini@faunalia.it
www.faunalia.it
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFX/3Z/NedwLUzIr4RAtJnAJ9Np/iM+jK7CCkqYmV2mstmy/7S5wCfWheh
QYPAHs6F61xsqUhZbP+IQG8=
=UAsu
-----END PGP SIGNATURE-----