[Insight-developers] SpatialObjects

Miller, James V (Research) millerjv at crd . ge . com
Fri, 31 Oct 2003 10:20:37 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C39FC2.89A82CDE
Content-Type: text/plain

The issue was not in querying a point after the object was created.  The
issue was in creating the spatial objects.  I want to use one block of code
to read the points from a file and then pass those points to appropriate
type of spatial object.  But different types of spatial objects use
different types of points.  So you have to "duplicate" the code to build
your point lists since a different type of list is needed for each spatial
object type. One solution may be to allow a line spatial object to accept
points without normals as well as points with normals.

Why does a line have N-1 normals?  Is this really a polyline with N points
(and hence N-1 segments)?  Why does a line need a normal but other spatial
objects do not?

> 2) LineSpatialObject::SetPoints() takes a list of LineSpatialObjectPoint
whereas
> PolygonSpatialObject::SetPoints() and LandmarkSpatialObject::SetPoints()
take lists of
> SpatialObjectPoint.  It looks like LineSpatialObjectPoints have a vector
associated with them.
> This meant I had to duplicate code to read landmarks, lines, and polygons
since I couldn't read
> the points into a common data structure and then decide whether to it is a
line, polygon, or
> landmark.

A LineSpatialObjectPoint has N-1 normals associated with it.
A LineSpatialObjectPoint derives from SpatialObjectPoint so you shouldn't
have to duplicate code when you are asking for the position of the point
only.



------_=_NextPart_001_01C39FC2.89A82CDE
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE></TITLE>

<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<P dir=ltr><FONT size=2>The issue was not in querying a point after the object 
was created.&nbsp; The issue was in creating the spatial objects.&nbsp; I want 
to use one block of code to read the points from a file and then pass those 
points to appropriate type of spatial object.&nbsp; But different types of 
spatial objects use different types of points.&nbsp; So you have to "duplicate" 
the code to build your point lists since a different type of list is needed for 
each spatial object type. One solution may be to allow a line spatial object to 
accept points without normals as well as points with normals.</FONT></P>
<P dir=ltr><FONT color=#0000ff size=2>Why does a line have N-1 normals?&nbsp; Is 
this really a polyline with N points (and hence N-1 segments)?&nbsp; Why does a 
line need a normal but other spatial objects do not?</FONT></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <P><FONT size=2>&gt; 2) LineSpatialObject::SetPoints() takes a list of 
  LineSpatialObjectPoint<BR>whereas<BR>&gt; PolygonSpatialObject::SetPoints() 
  and LandmarkSpatialObject::SetPoints()<BR>take lists of<BR>&gt; 
  SpatialObjectPoint.&nbsp; It looks like LineSpatialObjectPoints have a 
  vector<BR>associated with them.<BR>&gt; This meant I had to duplicate code to 
  read landmarks, lines, and polygons<BR>since I couldn't read<BR>&gt; the 
  points into a common data structure and then decide whether to it is 
  a<BR>line, polygon, or<BR>&gt; landmark.<BR><BR>A LineSpatialObjectPoint has 
  N-1 normals associated with it.<BR>A LineSpatialObjectPoint derives from 
  SpatialObjectPoint so you shouldn't<BR>have to duplicate code when you are 
  asking for the position of the 
point<BR>only.<BR></P></FONT></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C39FC2.89A82CDE--