<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma" bgColor=#ffffff>
<DIV><FONT face=Arial>Hi Ron</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>One approach would be to run an elevation filter on your
3D map (to create scalar values) and then a transform with scale set to
1.0,1.0,0.0 which will set all your z values to 0.0. Then probe this
dataset with your overlay features (which are at elevation 0.0) and run the
output through vtkWarpScalars (to apply the sampled elevations to your overlay).
The only problem is that sampling will only take place at points defined in
your overlay dataset and the result may not look good due to
non-sampled intersections with your 3D map. Adding some extra elevation to
your overlay may fix this.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Ultimately, for a perfect fit, you need to find all
intersections between your overlay features and edges of your 3D triangulation
(in 2D projection) and insert these into your overlay features before
the sampling process. I don't know if there is a filter to do this in vtk (I'm a
bit rusty). If there isn't, this wouldn't be too hard to implement
with a sweep algorithm - but the insertions would require a lot
of book-keeping.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>HTH</FONT><BR>Malcolm Drummond<BR></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Ron.Chapman@rwdi.com href="mailto:Ron.Chapman@rwdi.com">Ron
Chapman</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 02, 2006 11:53
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] 3D Visualization of
Map Data</DIV>
<DIV><BR></DIV>
<DIV>I have been trying to get VTK to plot 3D map data, but am running into
some problems.</DIV>
<DIV> </DIV>
<DIV>Read x,y,z file into points</DIV>
<DIV>Manually create polygons from this and store cells
in vtkPolyData</DIV>
<DIV>vtkPolyDataNormals</DIV>
<DIV>vtkPolyDataMapper</DIV>
<DIV>vtkActor</DIV>
<DIV> </DIV>
<DIV>This works fine and I can see my map in 3D</DIV>
<DIV> </DIV>
<DIV>I then need to overlay this 3D base map with roads, rivers, cut
lines, etc. which are stored in ESRI shape files. I have
been these shape files using vtkShapefileReader (this was created by
Malcolm Drummond of this group). Essentially it creates a bunch of
vtkPolyLines in 2D. </DIV>
<DIV> </DIV>
<DIV>My problem occurrs when I try and map the 2D vtkPolyLine Data onto
the 3D Surface and am not sure how to do this.</DIV>
<DIV> </DIV>
<DIV>I've read numerous posts discussing texture mapping and originally
was thinking of transforming the 2D data into an image, and then
texture mapping onto my 3D surface. I'm not sure this is the correct
approach and was wondering if there is a better way of doing this?</DIV>
<DIV> </DIV>
<DIV>Ron</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>This is the private
VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ<BR>Follow this link to
subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></BLOCKQUOTE></BODY></HTML>