-
Notifications
You must be signed in to change notification settings - Fork 828
Description
osgEarth Version (required): 3.7.2
Description of the problem
I'm experiencing a memory management issue when using a tiled feature model layer with ResampleFilter for LOD-based simplification. While the filter successfully reduces geometry complexity at lower Level of Details (LODs), I've discovered that the simplified geometry from lower LODs is being used as the base for further simplification at higher LODs, rather than resampling from the original feature geometry.
Current Behavior
- ResampleFilter is applied to simplify features at lower LODs (works as expected)
- As user zooms in and higher LODs are loaded, memory consumption increases significantly
- Higher LOD tiles appear to resample from the already-simplified lower LOD geometry instead of the original source geometry
- Lower LOD data is not being unloaded from memory when transitioning to higher LODs, causing memory to accumulate continuously
- This cascading simplification combined with memory retention results in progressive loss of detail and ever-increasing memory consumption
Expected Behavior
Each LOD level should apply ResampleFilter to the original, full-resolution feature geometry independently, and lower LOD data should be unloaded when no longer needed, ensuring:
Appropriate level of detail for each LOD
Lower LOD tiles are released from memory when higher LOD tiles are loaded
Predictable and bounded memory consumption patterns
No cumulative geometry degradation across LOD levels
Configuration Example
<FeatureModel>
<features driver="ogr">
<url>path/to/features.shp</url>
</features>
<styles>
<style type="text/css">
default {
stroke: #ffff00;
stroke-width: 2px;
}
</style>
</styles>
<filters>
<resample min_length="10" max_length="50"/>
</filters>
<layout>
<tile_size>1024</tile_size>
<level name="0" max_range="50000"/>
<level name="1" max_range="25000"/>
<level name="2" max_range="10000"/>
<!-- Additional levels -->
</layout>
</FeatureModel>
Questions
- Is this the intended behavior of ResampleFilter across LOD levels?
- Is there a configuration option to ensure each LOD resamples from original geometry?
- Why are lower LOD tiles retained in memory when higher LOD tiles are loaded? Is there a paging/unloading mechanism that should be releasing them?
- Are there configuration parameters (e.g., cache size, tile expiry policy) that control memory management for tiled feature models?
- What's the recommended approach for managing memory growth in tiled feature models while maintaining geometry quality at higher LODs?
- Should I be using a different filter or combination of filters for this use case?
Additional Information
Any guidance on best practices for memory-efficient feature rendering with appropriate LOD management would be greatly appreciated.
Note: I can provide more specific configuration details, profiling data, or code samples if needed.