[OpenLayers-Users] Does OpenLayers support orientation of points?

Robert Jeansoulin Robert.Jeansoulin at univ-mlv.fr
Thu Jul 12 05:51:00 EDT 2007


     - About this " orientation of points " discussion thread:

I do believe that any " Geometry " or " Feature " can possibly be attributed
an orientation, not only Points.
A LineString, a Polygon, even a MultiPolygon may be characterized by a
" general orientation ".

Actually, a good approximation of any spatial object could be an ellipse
(the kind of potato we can sketch on a map) for which we need a  LatLon
plus two  floats.
Let's name Potatoid this ellipse.

Hence, I would be interested by a more general solution, and I have a
suggestion :

Tim proposes to use  OpenLayers.Feature.Vector
that associates external attributes to a Geometry, it is one point ;

the second point is that there is a method
      Geometry.atPoint(lonlat, toleranceLon, toleranceLat)
that positions approximately the Geometry,
it is  - as I understand - simply the center of the bounding box
hence, for a Point, it should be the Point itself (I didn't check)
but the other two parameters can be used to determine the orientation,
and for Point, they are certanly zero  (I didn't check)

therefore, the Potatoid, or ellipse, or oriented point, etc. can be 
set and drawn
from the answer of
      Geometry.atPoint(lonlat, tlon, tlat)
or OpenLayers.Feature.Vector.Geometry.atPoint(lonlat, tlon, tlat)



The problem is : how to set these  (lonlat, tlon, tlat)
differently that from the bounding box ?

my  suggestion is that the method  atPoint should exist also at the
Vector level, and:
-   to add methods :
     Vector.setPoint(latlon)
     Vector.setOrientation( tlon, tlat)    e.g.:  sinAlpha, cosAlpha
     in case we want to explicitely set the Potatoid
     It can be set in the  Vector.attributes object, but we need a special flag
     to inform the  atPoint() method to behave differently in this case :

-   Vector.Geometry.atPoint() is exactly Geometry.atPoint()
      if the flag is false
-   Vector.Geometry.atPoint() returns (lonlat, tlon, tlat) computed from the
     Vector.attributes, considered as the Potatoid,  if the flag is true

That it makes sense ?
Merci,
Robert.
-- 
------------------------------------------------------------
Robert JEANSOULIN
PhD, Ing., DR CNRS, Assoc.Prof. U.Laval
------------------------------------------------------------
Labo.Informatique - Institut Gaspard Monge
   Universite Paris-Est
   77454 - MARNE-LA-VALLEE Cedex - France
RER stop: " Noisy-Champs " (line A)
Tel.:  +33 (0)1 60 95 77 26
Fax:  +33 (0)1 60 95 77 55
www: http://igm.univ-mlv.fr/~jeansoul/



More information about the Users mailing list