New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoRSS tile expiry: do not expand mask Envelope for multiple Polygon entries #56
Comments
good point. Cheers, |
The code is very involved thus hard for me to say something intelligent, but will try anyway ;-). The basic idea IMHO is to assemble a set of "dirty" tiles that need reseeding affected by the geometries from the feed entries. I had tried setting maxmaskLevel to 18 but that value was not accepted as the canvas would become too big. Possibly that is a point I don't understand from the implementation: building a canvas for each zoomlevel where each pixel represents a tile and then setting pixels for the envelopes of the rss entry geoms ? I think I don't get the "Canvas" solution. I would guess that for each layer zoom level a sparse 2D matrix could be build up that holds the dirty tiles. Also very involved and in worst case the matrices would not be sparse. Isn't the following an idea for processing georss entries (have done a simimlar implementation in the past but with less constraints on geometries and projections)
A suggestion, this is. There are always worst case scenario's based on the contents of the feed geometries. On the other hand if one is to use GeoRSS-based seeding, one has to be aware of any performance impact based on the content of the feed. |
I see what you mean. Problem is we don't know when we're talking about billions of tiles and hence keeping track of which tiles have been touched is just non practical. The one thing I'd try is to, instead of holding a raster mask per zoom level, having another kind of DiscontinuousTileRange that holds a single JTS geometry. |
When the GeoRSSTileRangeBuilder encounters multiple entries in a GeoRSS feed it will let the GeometryRasterMaskBuilder aggregate the entries' geometries by expanding an initial Envelope from the first entry. In some cases like when geometries in the GeoRSS entries are widely dispersed e.g. around the globe, this will truncate/seed much more tiles than neccessary. Most of these tiles may be blanc.
The current implementation is as follows: for each entry GeoRSSTileRangeBuilder will call GeometryRasterMaskBuilder.setMasksForGeometry(geometry). setMasksForGeometry() maintains a variable "Envelope aggregatedGeomBounds" which it will expand after initial creation by calling expandToInclude() on this Envelope.
This behaviour (tiles reseeded for the aggregate Envelope of all Polygons) can be observed when constructing a GeoRSS feed that provides multiple Polygon entries in a single feed response. When the same feed is provided by a single subsequent Polygon entry in each feed response, only the tile area of each Polygon Envelope is reseeded. This is IMO the expected/wanted behaviour in many if not all cases.
The solution is to only build masks for each geometry, at least with Polygons. Points may be a special case.
The text was updated successfully, but these errors were encountered: