[OpenLayers-Users] tiling features to speed detecting features on the client

Graham Carlyle graham.carlyle at maplecroft.com
Wed Apr 16 09:27:15 EDT 2008


I've just had a quick look at the WFS layer & tile code and can see how
this is similar to what I'm thinking of but it doesn't seem to have a
concept of "griddedness" or tile resolution. In order for the server to
be able to reduce the detail of the feature geometry it would need
something like a width & height parameter sent in the request. Also I
was imagining that quantising & clipping a feature geometry might be
quite resource intensive on the server and so tiling the requests would
allow caching or pre-generation in a similar manner to TMS or WMS-C. 

So maybe I could implement a subclass of OpenLayers.Layer.Grid that
generated requests in TMS or WMS format and then parsing the features
returned in a similar manner to the OpenLayers.Layer.WFS class.

Sorry for my GIS ignorance but does WFS support the notion of reducing
the detail of a feature geometry in response to a request? I had a look
at the spec and can see mention on limits on the number of features and
conditions on their properties but not about the level of detail.

cheers,
Graham


On Wed, 2008-04-16 at 07:00 -0400, Paul Spencer wrote:
> Hi Graham,
> 
> There is an implementation of something similar to this in the WFS  
> Tile code, and there is also substantial new work being undertaken by  
> Tim Schaub to introduce Vector Behaviours which will be a much more  
> sophisticated way of managing this.
> 
> http://trac.openlayers.org/wiki/Proposal/VectorBehavior
> 
> Cheers
> 
> Paul
> 
> On 16-Apr-08, at 6:38 AM, Graham Carlyle wrote:
> > In a previous post I said that I wanted to detect which feature a  
> > mouse
> > had clicked on at the client side in order to be more responsive. The
> > suggested solution worked well, that of downloading a geojson
> > representation of the features up front and using the 2.6 OL feature  
> > of
> > detecting whether the feature's geometry intersected with the mouse
> > point.
> >
> > However for large maps, downloading the features in geojson (or  
> > another
> > format) of the required detail for all zoom levels for detecting which
> > feature is being clicked on is prohibitively large.
> >
> > So this got me thinking, how about tiling the feature information, or
> > rather the geometry associated with it?
> >
> > On the server side I can see a way of hacking TileCache to generate a
> > geojson feature "tile" by clipping the feature geometry to the tile
> > bounds and then quantising the geometry by the tile resolution (using
> > some shapely, worldmill & geojson sauce).
> >
> > On the client side a new type of OpenLayers Layer would download these
> > feature "tiles" in parallel with the image tiles and provide access to
> > the "visible" features for mouse click detection etc.
> >
> > I don't need to do this but I guess you could also render these  
> > "tiled"
> > features and possibly get around some of the browser problems of
> > rendering vector layers with too many vectors or vertices because of  
> > the
> > geometry simplification of the tiling & quantisation.
> >
> > Is this madness? Am I missing something that exists already that would
> > achieve what i want.
> >
> > thanks,
> > Graham
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list