Does OpenLayers support orientation of points?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Does OpenLayers support orientation of points?

Tom (JDi Solutions)
All,

The docs appear to show that Geometry.Point (<a href="http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html) only supports a basic x and y with no direction.  I ask because we're going to be implementing an image library which could include the location from which the image was taken and also the direction the camera was facing (2d only!)

If this feature does not already exist is there any call for it?  It's not an urgent requirement for us but I guess it could be done fairly easily by extending the Point class?<a href="http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

regards,

Tom

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Erik Uzureau-3
Hi Tom,

The feature you're suggesting doesn't sounds like something that would
fit the general use case for OpenLayers, but as you say in the end of
your mail, it would be *very* simple to add that functionality by
extending the Point class.

Let us know if you need help doing that.

Erik



On 7/11/07, Tom (JDi Solutions) <[hidden email]> wrote:

> All,
>
> The docs appear to show that Geometry.Point (
> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html)
> only supports a basic x and y with no direction.  I ask because we're going
> to be implementing an image library which could include the location from
> which the image was taken and also the direction the camera was facing (2d
> only!)
>
> If this feature does not already exist is there any call for it?  It's not
> an urgent requirement for us but I guess it could be done fairly easily by
> extending the Point class?
>
> regards,
>
> Tom
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Tom (JDi Solutions)
Cool, I may do that and I'll let you know if and when, just don't hold your breath!

Many thanks,

Tom

On 7/11/07, Erik Uzureau < [hidden email]> wrote:
Hi Tom,

The feature you're suggesting doesn't sounds like something that would
fit the general use case for OpenLayers, but as you say in the end of
your mail, it would be *very* simple to add that functionality by
extending the Point class.

Let us know if you need help doing that.

Erik



On 7/11/07, Tom (JDi Solutions) <[hidden email]> wrote:

> All,
>
> The docs appear to show that Geometry.Point (
> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html )
> only supports a basic x and y with no direction.  I ask because we're going
> to be implementing an image library which could include the location from
> which the image was taken and also the direction the camera was facing (2d
> only!)
>
> If this feature does not already exist is there any call for it?  It's not
> an urgent requirement for us but I guess it could be done fairly easily by
> extending the Point class?
>
> regards,
>
> Tom
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
>


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Stephen Woodbridge
In reply to this post by Erik Uzureau-3
Erik,

I can think of a few use cases that would fit OpenLayers for this feature:

1) photo with direction of camera indicated as Tom mentioned.
2) GPS tracking, showing a vehicle symbol with the orientation of the
symbol aligned to the direction of travel
3) animating a car driving over a route and keeping it oriented to the road
4) Showing symbols for wind force and direction, these need to be
oriented with the direction of the wind and might be served via WFS.
Currently there are some mapserver users doing this in mapserver, but
they might want a more interactive model to work with.

These are just few that come to mind off the top of my head, I'm sure
there are others, so don't discount this feature too fast.

-Steve W.

Erik Uzureau wrote:

> Hi Tom,
>
> The feature you're suggesting doesn't sounds like something that would
> fit the general use case for OpenLayers, but as you say in the end of
> your mail, it would be *very* simple to add that functionality by
> extending the Point class.
>
> Let us know if you need help doing that.
>
> Erik
>
>
>
> On 7/11/07, Tom (JDi Solutions) <[hidden email]> wrote:
>> All,
>>
>> The docs appear to show that Geometry.Point (
>> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html)
>> only supports a basic x and y with no direction.  I ask because we're going
>> to be implementing an image library which could include the location from
>> which the image was taken and also the direction the camera was facing (2d
>> only!)
>>
>> If this feature does not already exist is there any call for it?  It's not
>> an urgent requirement for us but I guess it could be done fairly easily by
>> extending the Point class?
>>
>> regards,
>>
>> Tom
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/users
>>
>>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Erik Uzureau-3
All good points. I didn't mean for my email to sound like a closed
door... My initial reaction was just that it's not something we'd want
in the core Pixel/Point object, but would make sense as a subclass.

Although maybe I'm wrong and it *would* be worth adding directly to Pixel/Point?

I'm far from an expert on GIS matters, so please always second-guess
me on things like this, I'm grateful for the feedback :-)


Erik




On 7/11/07, Stephen Woodbridge <[hidden email]> wrote:

> Erik,
>
> I can think of a few use cases that would fit OpenLayers for this feature:
>
> 1) photo with direction of camera indicated as Tom mentioned.
> 2) GPS tracking, showing a vehicle symbol with the orientation of the
> symbol aligned to the direction of travel
> 3) animating a car driving over a route and keeping it oriented to the road
> 4) Showing symbols for wind force and direction, these need to be
> oriented with the direction of the wind and might be served via WFS.
> Currently there are some mapserver users doing this in mapserver, but
> they might want a more interactive model to work with.
>
> These are just few that come to mind off the top of my head, I'm sure
> there are others, so don't discount this feature too fast.
>
> -Steve W.
>
> Erik Uzureau wrote:
> > Hi Tom,
> >
> > The feature you're suggesting doesn't sounds like something that would
> > fit the general use case for OpenLayers, but as you say in the end of
> > your mail, it would be *very* simple to add that functionality by
> > extending the Point class.
> >
> > Let us know if you need help doing that.
> >
> > Erik
> >
> >
> >
> > On 7/11/07, Tom (JDi Solutions) <[hidden email]> wrote:
> >> All,
> >>
> >> The docs appear to show that Geometry.Point (
> >> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html)
> >> only supports a basic x and y with no direction.  I ask because we're going
> >> to be implementing an image library which could include the location from
> >> which the image was taken and also the direction the camera was facing (2d
> >> only!)
> >>
> >> If this feature does not already exist is there any call for it?  It's not
> >> an urgent requirement for us but I guess it could be done fairly easily by
> >> extending the Point class?
> >>
> >> regards,
> >>
> >> Tom
> >>
> >> _______________________________________________
> >> Users mailing list
> >> [hidden email]
> >> http://openlayers.org/mailman/listinfo/users
> >>
> >>
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Tim Schaub-2
In reply to this post by Stephen Woodbridge
The answer is yes, OpenLayers does support adding arbitrary attributes
to points.  You should be looking at OpenLayers.Feature.Vector.

A point geometry doesn't have direction.  A feature is geometry plus
attributes.  If you create a feature with a point geometry, you can
store any arbitrary attributes along with it.

Hope that makes sense.
Tim

Stephen Woodbridge wrote:

> Erik,
>
> I can think of a few use cases that would fit OpenLayers for this feature:
>
> 1) photo with direction of camera indicated as Tom mentioned.
> 2) GPS tracking, showing a vehicle symbol with the orientation of the
> symbol aligned to the direction of travel
> 3) animating a car driving over a route and keeping it oriented to the road
> 4) Showing symbols for wind force and direction, these need to be
> oriented with the direction of the wind and might be served via WFS.
> Currently there are some mapserver users doing this in mapserver, but
> they might want a more interactive model to work with.
>
> These are just few that come to mind off the top of my head, I'm sure
> there are others, so don't discount this feature too fast.
>
> -Steve W.
>
> Erik Uzureau wrote:
>> Hi Tom,
>>
>> The feature you're suggesting doesn't sounds like something that would
>> fit the general use case for OpenLayers, but as you say in the end of
>> your mail, it would be *very* simple to add that functionality by
>> extending the Point class.
>>
>> Let us know if you need help doing that.
>>
>> Erik
>>
>>
>>
>> On 7/11/07, Tom (JDi Solutions) <[hidden email]> wrote:
>>> All,
>>>
>>> The docs appear to show that Geometry.Point (
>>> http://dev.openlayers.org/docs/OpenLayers/Geometry/Point.html)
>>> only supports a basic x and y with no direction.  I ask because we're going
>>> to be implementing an image library which could include the location from
>>> which the image was taken and also the direction the camera was facing (2d
>>> only!)
>>>
>>> If this feature does not already exist is there any call for it?  It's not
>>> an urgent requirement for us but I guess it could be done fairly easily by
>>> extending the Point class?
>>>
>>> regards,
>>>
>>> Tom
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Does OpenLayers support orientation of points?

Jeansoulin
In reply to this post by Erik Uzureau-3
     - 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/
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users