ThinkGeo.com    |     Documentation    |     Premium Support

Grid Tile Refresh

Hi,

I have loaded a very small grid file to my map. When I move around the map, it redraws in a very sluggish manner and has lots of aliasing.

Also, if I toggle the layer visibility on and off, it will not redraw at that zoom level until I zoom out or in first.

I have a video of this that I will email to you as it will not allow me to attach it here.

SingleTile will be better for your scenario, but MultiTile should not be that slow if it’s a small file, can you send over the grid file to us?

What’s the “aliasing” you meant? can you give me a specific sample?

Toggling the layer visibility will not redraw the layer until the overlay that holds the layer is refreshed (layerOverlay.RefreshAsync()). Or you can just set layerOverlay.IsVisible to true or false.

See attached. I tried using SingleTile which still took forever, but at least did not build one tile at a time. Note that this is way slower than v10.

MC Synthetic bathy.zip (805.2 KB)

On the aliasing, it is showing me grid cells that aren’t really the grid cells themselves. It’s very odd and looks terrible compared to v10. You can also clearly see the tiles themselves after rendering which is not good. This is not the only layer that shows the tiles either. Regular area shape files look like this when they have a fill color.

What is the difference between map.RefreshAsync(LayerOverlay) and LayerOverlay.RefreshAsync? There seems no end to the differences between v10 and v14… Is there documentation for this somewhere?

So how much slower v14 is on your side? Can you also send me your v14 demo code?

V14 is using Skia while v10 is using GDI+. They are totally different engines, but I don’t see Skia is worse when drawing polygons. Did you set the drawing properties in v10 (InterpolationMode, CompositingMode, etc), and did you set the drawing properties in v14? For example, is your layer’s DrawingQuality HighSpeed or HighQuality? Can you send me a v10 vs v14 image show me what exactly you mean by v14 is terrible?

map.RefreshAsync(LayerOverlay) did a bit more things, such as initializing the overlay/raising events(OverlaysDrawing/OverlaysDrawn), than overlay.RefreshAsync().

My MapView v14 object does not show the DrawingQuality property. In v10 I tried testing HighQuality because the property was there, but I ended up leaving it at the default. How do I set DrawingQuality now? There seem to be no properties of the MapView now that even sort of suggest a quality/speed setting.

Oh wait… Each overlay has a drawing quality setting now. That’s new. Is this the only optimization parameter to be concerned with? Setting it to HighSpeed makes a difference when combining with SingleTile. Without SingleTile it is pretty poor. Even the transparency changes as the tiles refresh.

I have already sent you a video to your email (would not let me attach here) showing the v14 refresh and how sluggish it is for such a small file. Before we compare to v10, what sort of performance do you see? Is it like my video or is it okay? Do you see all the problems with aliased lines and tiles?

Regarding the drawing quality, here I want to make sure:

  1. After setting Overlay.DrawingQuality to HighQuality, is the quality better only with SingleTile, or is it better with both SingleTile and MultiTile(be sure the tileCache is cleaned up when testing with MultiTile)?
  2. After setting Overlay.DrawingQuality to HighQuality, is the quality as good as v10 in your test, or you can still tell some difference?
  3. When you say v10 quality is better than v14 quality, do you mean v10 with the setting of HighQuality vs v14 DefaultQuality, or v10 DefaultQuality vs v14 DefaultQuality?
  4. Specifically regarding “aliased lines and tiles”, can you just send me a screenshot and point it out what exactly you meant, to make sure we are on the same page? And I believe you don’t see this alias thing in your v10 version, do you see that in v14 with HighQuality?

Regarding the performance, again can you also send me your v14 demo code?

Here is an example of the aliasing. Look at the lines delineating cells carefully. Sometimes horizontal and vertical lines are skipped giving an odd grainy look. This is with Single Tile and HighQuality drawing, but the same happens with HighSpeed.

Here’s another example. Note the blocky appearance.

  1. I am using SingleTile, but the default of Multi-Tile sounds better. Maybe that is my problem that I am not setting up the TileCache. By chance would the rendering of MultiTile be poor if you didn’t setup a TileCache location? I only ever used this for WMTS layers in v10. I see some samples in the HowDoI, but I will probably have more questions as the details of what is going on under the hood is not clear to me.

  2. No, not even close. Here’s the same grid in v10. One thing I am noticing is that v14 is attempting to draw cell boxes at very high scales. My v10 example here doesn’t draw the cells until I zoom to 1:3500. Maybe this is the problem? Why am I getting box outlines in v14 when I am using this code to specifically prevent the box outlines from being drawn?

             AreaStyle nearStyle = new AreaStyle(new GeoPen(GeoColor.FromArgb(alpha, colors[0]), 1),
                 new GeoSolidBrush(GeoColor.FromArgb(alpha, colors[0])));
             AreaStyle farStyle = new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(alpha, colors[0])));
    
             ZoomLevel clevel = new ZoomLevel(level.Scale);
             if (level.Scale < 3500)
                 clevel.CustomStyles.Add(nearClass);
             else
                 clevel.CustomStyles.Add(farClass);
    

I can not send you demo code for this at the moment. All my testing is in the production code. It will take a long time to segment out. For now, I think getting rid of the outlines is possibly the biggest issue.

We are using AntiAlias for the rendering which turned out to be the cause of the issue. Can you

  1. pull the latest beta (ThinkGeo.UI.WinForms 14.4.0-beta099)
  2. set layerOverlay.AntiAlias = false; in your code

And let me know if everything looks better.

AntiAlias is good for the curves, but it would cause the above issue. Also setting it to false will make the render faster.

Ben,

It looks good now.

As for the performance, it’s not any faster than v10 from what I can see, but way better than before.

Do you think going back to MultiTile now that the alias issue is fixed would show an improvement?

Yep, it would be more responsive, and you can enable the caching after switching back to multi-tile.