ThinkGeo Raster Sampling Logic & Behavior Matrix¶
Last Updated: February 13, 2026
Core Vision: In ThinkGeo v15.0, we have completely overhauled our raster sampling strategy. By transitioning from a legacy "one-size-fits-all" high-quality interpolation to a modern context-aware, content-adaptive model, we ensure pixel-exact fidelity for thematic data and razor-sharp clarity for digital maps, while maintaining the smooth, high-performance rendering expected for traditional imagery.
1. v14 Preset Behaviors (v14.4.4 Detailed Behaviors)¶
In v14.4.4, raster sampling follows the "Path-First" principle:
v14 Preset (DrawingQuality) | Vector/Text AA | Optimized Drawing Path | Normal Drawing Path |
|---|---|---|---|
| HighSpeed | ON (Default) | SKFilterQuality.High | SKFilterQuality.Low (Bilinear) |
| Default | ON (Default) | SKFilterQuality.High | SKFilterQuality.Medium (Bilinear + Engine-decided Mipmaps) |
| Medium | ON (Default) | SKFilterQuality.High | SKFilterQuality.Medium (Bilinear + Engine-decided Mipmaps) |
| HighQuality | ON (Forced) | SKFilterQuality.High | SKFilterQuality.High |
Implementation of SKFilterQuality.High¶
In v14's Skia engine, SKFilterQuality.High was an adaptive resampling suite:
- Upscaling: Uses Bicubic interpolation (Mitchell-Netravali filter).
- Downsampling: Uses automatic multi-level sampling optimization. The engine dynamically decides whether to enable Mipmap filtering to suppress aliasing.
- Hardcoded Path: v14 hardcoded this level in
DrawImageWithOptimization, covering almost all map-related rendering.
Which scenarios use the "Optimized Drawing Path"? This path forces SKFilterQuality.High: * All TileOverlay base maps: OSM, Google Maps, WMS, WMTS, etc. * All Geographic Layers: RasterLayer, FeatureLayer symbols, etc. * Most UI/Adornment Elements: Compass, Scale bar, Logo, and Icons.
Which scenarios use the "Normal Drawing Path"? Mainly triggered in auxiliary scenarios that bypass the Resize optimization path: * Color Transformations: Images processed via ColorMatrix, HeatStyle, or dynamic colorization. * Direct Bitmap Tools: Utility methods like SKBitmapHelper that render directly to pixels without Canvas optimization.
Note (Independent Path): Printing & Exporting (
PrinterGeoCanvas) uses a separate GDI+ path and is unaffected by Skia logic.
2. v15 Preset Matrix (v15+ Architecture)¶
Preset (DrawingQuality) | Bitmap Edge AA | Vector AA | Text AA | Sampling Algorithm |
|---|---|---|---|---|
| Dynamic (Recommended) | OFF | ON | ON | Dynamic (Adaptive) |
| Standard | OFF | ON | ON | Mitchell / Linear+Mipmap |
| HighSpeed | OFF | OFF | OFF | Mitchell / Linear+Mipmap |
| Default * | OFF | ON | ON | Mitchell / Linear+Mipmap |
| Medium * | OFF | ON | ON | Mitchell / Linear+Mipmap |
| HighQuality * | OFF | ON | ON | Mitchell / Linear+Mipmap |
Technical Note: v15.0 migrates to
SKSamplingOptions, manually decomposing v14's old "auto-switching" behavior into explicit Mitchell (Upscale) and Linear+Mipmap (Downscale) algorithms.
3. Sampling Decision Matrices¶
3.1 Standard Behavior (v14 / v15-Standard)¶
| Scaling Scenario | v14 / v15-Standard Algorithm |
|---|---|
Upscale / Identity (scale >= 1.0) | Mitchell (Bicubic) |
Downscale (scale < 1.0) | Linear + Mipmap (Anti-shimmer) |
3.2 Dynamic Mode Content Types¶
Content Type (RasterContentType) | Visual Example (100x100) | Description & Examples | Optimization Goal |
|---|---|---|---|
| Thematic Map (Categorical) | ![]() | Discrete data. E.g., Land-use, administrative zones, weather warn areas. | Force Nearest: Prevents color bleeding and intermediate colors. |
| Digital Map (Cartographic) | ![]() | Vector-style tiles. E.g., OSM tiles, Street maps with labels/lines. | Buffer Nearest: Eliminates filter blur near 1:1 scale for sharp labels. |
| Imagery (Aerial/Satellite) | ![]() | Photographic imagery. E.g., Satellite photos, drone captures. | Lock Smoothing: Eliminates pixel shimmering during zoom-out. |
| Continuous Data (Continuous) | ![]() | Gradient data. E.g., DEM hillshades, heatmaps. | Lock Smoothing: Maintains fluid transitions. |
3.3 Dynamic Mode Decision Matrix¶
(Bold indicates a Content-Specific Override):
| Scaling Scenario | Categorical | Cartographic | Imagery / Continuous | Unspecified |
|---|---|---|---|---|
Significant Upscale (> 1.05) | Nearest | Mitchell | Mitchell | Mitchell |
Minor Upscale (1.0 < scale <= 1.05) | Nearest | Nearest | Mitchell | Mitchell |
Absolute 1:1 (= 1.0) | Nearest | Nearest | Mitchell | Mitchell |
Minor Downscale (0.95 <= scale < 1.0) | Nearest | Nearest | Linear+Mipmap | Linear+Mipmap |
Significant Downscale (< 0.95) | Nearest | Linear+Mipmap | Linear+Mipmap | Linear+Mipmap |
Decision Logic Key: 1. 1:1 Divergence: At absolute 1:1, Digital and Thematic maps prioritize "Physical Sharpness" (Nearest), while Imagery follows the Mitchell path. 2. Buffer Zones: Cartographic tiles use a 5% tolerance band around 1:1 to prevent floating-point jitters from causing label blur. 3. Fallback: Imagery / Continuous / Unspecified types follow the 1.0 threshold split (Mitchell if >= 1.0, Linear+Mipmap if < 1.0).
4. Rendering Evolution: Intelligent Inference & Overrides¶
4.1 v14 Limitations¶
- Color Bleeding: Forced interpolation created "fake" colors at categorical boundaries.
- Micro-Scaling Blur: Rounding errors (e.g., 0.999x) triggered filters, making labels fuzzy.
- Tile Seams: Edge anti-aliasing caused faint seams in solid-color maps.
4.2 v15 Dynamic Advantages¶
- Fidelity: Categorical maps stay pixel-exact at all scales.
- Sharpness/No-Seams: Cartographic maps remain razor-sharp and seam-free within the 1:1 buffer.
4.3 Modern Decision Model: Heuristics & Properties¶
v15 utilizes a two-tier decision system to balance automation and control:
-
Class-Level Heuristics (Internal Logic):
- FeatureLayer: Scans styles. If
HeatStyleis present, it usesContinuous; otherwise, it defaults toCartographic. - Internet Layers (Google/Bing/Cloud): Automatically toggles between
ImageryandCartographicbased on the map type (e.g., Satellite vs. Street). - Protocol Layers (WMS/WMTS/ArcGIS): Defaults to
Cartographicto protect the clarity of pre-rendered labels and lines.
- FeatureLayer: Scans styles. If
-
Instance-Level Overrides (User Overrides):
- Users can inject custom logic via the
RasterContentTypeProvider.NET property without subclassing:layer.RasterContentTypeProvider = l => RasterContentType.Imagery;
- Users can inject custom logic via the



