[vtkusers] Please help: Is there a way to close gaps in PolyData?

Jared Cohen Jared.Cohen at noaa.gov
Tue Aug 10 17:56:12 EDT 2004


I'm developing an application that reads a file containing 
longitude/latitude coordinates and scalar values at each point; it then 
maps those scalars onto a sphere in VTK. Some datasets don't encompass 
the entire globe, but just a part of it; hence, I needed a way to create 
a partial sphere when needed. I achieved this by building a 
vtkPlaneSource of the appropriate size, and used a SphericalTransform 
and TransformPolyDataFilter to warp the plane into a sphere.

Here's the problem. I'm currently working with a dataset that stops just 
short of covering the entire globe; i.e., it contains longitude values 
that range from 1 to 359, instead of from 0 to 360. Hence, there's a gap 
in the sphere where no data exists, between the first and last longitude 
values. However, this gap is exactly the same width as the other 
polygons making up the sphere; i.e. each two points have distance X 
separating them, and the first and last longitudes ALSO have X distance 
separating them. This leads me to believe that whoever wrote the dataset 
intended for the points on the first and last longitudes to be "bridged" 
by one last row of polygons, thus closing the gap.

My question is, how do I accomplish this?? Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040810/da834df0/attachment.htm>


More information about the vtkusers mailing list