[OpenLayers-Dev] [Users] Markers performance

David William Bitner david.bitner at gmail.com
Tue Oct 24 11:26:17 EDT 2006


Perhaps this is a job for WFS Basic --

If we make a layer for WFS basic -- we could use the bbox and then then
maxfeatures which could be a call to a clustering algorithm to limit the
points (rather than something like the first x points it comes to).  With
the output format, we could stay along the GeoRSS lines by utilizing GeoRSS,
or we could define a GeoJSON output format (Sean Gilles has already done
some work on this) that closely matches GeoRSS in data format but might save
some time on the client side (and it'd be simple to dump from a Python
server).

http://www.ogcnetwork.net/wfsbasic

On 10/24/06, David William Bitner <david.bitner at gmail.com> wrote:
>
> The problem that this breeds is that while it would work great when zoomed
> in, you still have the same problem when zoomed out unless you do some kind
> of point clustering.
>
> Which leads me to .... http://wiki.osgeo.org/index.php/Point_Clustering ..
> If you have any thoughts on methods for point clustering (or any code that
> implements point clustering) please add them to this wiki.  This is a
> problem that a lot more folks than just openlayers are facing.
>
> My personal take on this after a fair bit of playing around with
> clustering on the client side is that it just is not scaleable to thousands
> of points.  Given that with GeoRSS, WFS, or other text feeds, either the
> data must exist on the server or there must be a proxy in place -- it makes
> a lot of sense to have a customized proxy that takes a feed along with a
> request for a tile size (in pixels and geographic) and returns the points
> clustered appropriately with some sort of attribute system that can show
> aggregated details.
>
> Last night I started playing around with Python Numeric and PyCluster with
> kmeans and hierarchical clustering.  I think that this approach has quite a
> bit of promise and it seemed pretty quick to me -- and would give better (at
> least subjectively to me) clumping of the data than gridded or interleaved
> approaches.
>
> With a clustered point server (either proxy or direct from data -- think
> points equivalent to tile.php), all we would need to do is to define our
> output format (JSON anyone?) and then create an OL layer that can take in
> that output.
>
> David
>
> On 10/24/06, Erik Uzureau <euzuro at gmail.com> wrote:
>
> > So on thinking this over, it has occurred to me something that might
> > be a good solution to this problem:
> >
> > A sort of blend of the OpenLayers.Layer.Markers layer and the
> > OpenLayers.Layer.WMS.Untiled Layer.
> >
> > Basically, the problem now is this:
> >
> > Let's say you are using OpenLayers.Layer.Text and load 1000
> > features/markers (like Andy is doing)
> >
> > Each and every one of those markers gets added to the DOM,
> > even though given the current view, maybe only 20 or 30 of them
> > are visible.
> >
> > The genius idea behind WMSUntiled is that it loades a tile that is
> > [variably] larger than the current map extent, and only loads the data
> > for that tile... and it is not until the user changes the extent (by
> > panning
> > or zooming) such that the original tile no longer covers the entire map
> > extent that the layer has to reload data.
> >
> > Well, we could really do the same thing for markers, right? Keep all
> > the markers in the OpenLayers.Layer.Makers.markers[] array and then
> > each time we need to load a tile, scan the markers array to see which
> > of them fall inside the bounds.
> >
> > ...which of course leads me to think that we could do some restructuring
> > of the layers classes. I have for long felt that WMS/Untiled.js was a
> > bit off.
> >
> > First of all, it *is* tiled. It's just that there's only ever *one*
> > tile. So to start
> > with, it might make more sense to call it  SingeTile or UnGridded or
> > something along those lines.
> >
> > Furthermore, if we are going to have an UnGridded WMS, why shouldn't
> > we have an UnGridded WFS?
> >
> > Obviously, the class rearrangements would require a significant amount
> > of work and rewriting and testing, etc.
> >
> > For Andy's problem, writing a simple UnGridded/SingleTiled Marker layer
> > would not be particularly difficult.
> >
> > Is anyone out there interested in any of this?
> >
> > Erik
> >
> >
> >
> > On 10/18/06, Erik Uzureau <euzuro at gmail.com > wrote:
> > >
> > > Dear andy,
> > >
> > > How many text markers are we talking about here? It is a known
> > > limitation
> > > of browsers that they cannot handle displaying (and then moving
> > > around)
> > > large numbers of Div DOMElements... especially with IE.
> > >
> > > If you can tell us a little more about what you're trying to do, maybe
> > > we can
> > > help you better. :-)
> > >
> > >
> > > --Erik
> > >
> > > On 10/18/06, andy < aborruso at tin.it> wrote:
> > > > Dear all,
> > > > I need an advice. I must use a marker layer for its tooltip feature.
> > > I
> > > > have used "OpenLayers.Layer.Text", I have had what I need but I have
> > > > slowness when I have a lot of text markers.
> > > > Are the other methods to create markers faster? Which is fastest?
> > > >
> > > > Thank you,
> > > >
> > > > a
> > > >
> > > > P.S. In the openlayers home page there is an inaccessible link:
> > > > http://openlayers.org/presentations/foss4g2006/examples/
> > > > _______________________________________________
> > > > Users mailing list
> > > > Users at openlayers.org
> > > > http://openlayers.org/mailman/listinfo/users
> > > >
> > >
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
> >
> >
> >
>
>
> --
> ************************************
> David William Bitner




-- 
************************************
David William Bitner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20061024/eb23427c/attachment.html


More information about the Dev mailing list