Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Re: Changing coordinate programmatically

Okay this is making a lot more sense now; if you are trying to have a dot move around on the screen like in the following video:
- http://www.opengeospatial.org/pub/www/ows3/index.html

You will not want to use a Feature ... to do real time animation; you will want: - to place your real time information on the map blackboard (however often it arrives) - either; create an animation (there is an example in the net.refractions.udig.tutorials.examples project) that draws this information on the screen at a set frequencey, or to create a map graphic that draws the information you put on the map blackboard

Now if you still want to update features (maybe you have thousands of dots moving on the screen and you are storing everything in a database?) use: - a filter: filterFactory.id( filterFactory.featureId( "id of your feature ) )
- featureStore.update( filter, "the_geom", new Point( x, y ) )

The reason we were having trouble communicating before was that there is no pointer to a Feature; we don't store them in memory and you are always working on a "copy". Even when we are storing them in memory we only give out a copy (for thread safety).

Now for some problems; say animation; having the data in memory and using a pointer is a good plan - that is what you can do with the map blackboard and your own custom mapgraphic.

Cheers,
Jody

Tankut KORAY wrote:
Hi Jody,
Thanks for your attention, I recently send some code snippet so you can see how I am getting my features. I am trying to acomplish this: I will have some features in a layer and somehow I will get to that feature via iterators, querying, holding pointer to feature etc. (doesnt matter). Than I want to update its coordinates according to some info that I am getting from another source. (like a GPS device) By the way, I will be doing this every often. (500ms or 1 sec) so another question is will this cause any performance problems? I am a newbie so maybe I am getting this all wrong.




Back to the top