<!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>&nbsp;</DIV>
<DIV><FONT face=Arial>One approach would be to run an elevation filter on your 
3D map (to create scalar values)&nbsp;and then a transform with scale set to 
1.0,1.0,0.0 which will set all your&nbsp;z values to&nbsp;0.0. Then probe this 
dataset with your overlay features (which are at elevation 0.0)&nbsp;and run the 
output through vtkWarpScalars (to apply the sampled elevations to your overlay). 
The only problem is that sampling will only&nbsp;take place at points defined in 
your overlay dataset and the result may not look good due to 
non-sampled&nbsp;intersections with your 3D map. Adding some extra elevation to 
your overlay may fix this.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Ultimately, for a perfect fit,&nbsp;you need to find all 
intersections between your overlay features and edges of your 3D triangulation 
(in 2D projection)&nbsp;and&nbsp;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).&nbsp;If there isn't, this wouldn't be too hard to&nbsp;implement 
with a sweep algorithm -&nbsp;but the insertions&nbsp;would&nbsp;require a lot 
of book-keeping.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</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>&nbsp;</DIV>
  <DIV>Read&nbsp; x,y,z file into points</DIV>
  <DIV>Manually create polygons from this and store cells 
  in&nbsp;vtkPolyData</DIV>
  <DIV>vtkPolyDataNormals</DIV>
  <DIV>vtkPolyDataMapper</DIV>
  <DIV>vtkActor</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>This works fine and I can see my map in 3D</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I&nbsp;then need to overlay this 3D base&nbsp;map with roads, rivers, cut 
  lines, etc. which are stored in ESRI shape files.&nbsp;&nbsp; I have 
  been&nbsp;these shape files using vtkShapefileReader (this was&nbsp;created by 
  Malcolm Drummond of this group).&nbsp; Essentially it creates a bunch of 
  vtkPolyLines in 2D.&nbsp; </DIV>
  <DIV>&nbsp;</DIV>
  <DIV>My problem occurrs when I try and&nbsp;map the 2D vtkPolyLine Data onto 
  the 3D Surface and am not sure how to do this.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I've read numerous posts discussing texture mapping and&nbsp;originally 
  was thinking of&nbsp;transforming the 2D data&nbsp;into an image, and then 
  texture mapping onto my 3D surface.&nbsp; I'm not sure this is the correct 
  approach and was wondering if there is a better way of doing this?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Ron</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</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>