This is a significant topic that is worth discussion. Thanks for raising it! Apologies in advance for the length of this post... when I zoom in and out of the data, those more significant points pop in and out of view seemingly randomly until they all display properly at a large scale.
and I think it would be nice for users to be able to control the trade-off between rendering speed on the one hand and rendering accuracy on the other.
Rendering speed isn't the issue. Manifold renders everything basically instantly, especially in small data like this, so a desire for speed does not cause the visual effects described. "Accuracy" isn't the issue either. Using that word is compounding an error in the first quote above. The error is "those more significant points." That's an error because the designer of the map has told Manifold all of the points are equally significant. Stating that some are more significant than others is the old "do what I mean, not what I told you to do" bit. The order of layers in a map specifies which objects are shown above other objects. (See the Maps topic for example). If you want objects to be shown above other objects, put them in a higher layer and they will, without fail, be shown above objects in lower layers. That is a simple system that is easy for new users to grasp and is easy to operate with simple controls. When a map has just a few layers you can drag layer tabs in a map left and right to order them as you like. When a map has many layers you can use the Layers pane to manage the ordering of very many layers in fast and sophisticated ways, including moving many of them at once higher and lower in the display stack or turning many logically related layers off and on at the same time. Putting records (objects) into the same layer tells Manifold they all have equal importance. The system doesn't know the map designer really meant some of those points were more important and it won't overrule what the designer told it to do. It's going to do its best to provide a rendering that captures a representative view of the layer considering all objects in it without simply drawing a black blob that is visually meaningless. That's where the misuse of "accuracy" comes in, since usually it is not possible to show *all* of the objects in a layer at the same time, for example, if there are not enough pixels in a monitor or in a region of the monitor that the user has told the system to use (via a zoom command). The sample data set provided in this thread is a good example. The sample data has 108,518 points in it. Zoom out to where the data set is the size of one square inch on the monitor and there are only about 9,200 pixels available in that square inch. But there are over ten times more objects to show than there are pixels in the designated region of the monitor. It's physically impossible to show all the objects "accurately" at that zoom level, if "accurate" is supposed to mean displaying each and every object. The sample data also illustrates a second effect that makes it impossible in most cases to display every object: the styles used in the map are a mix of large symbols and small symbols, ranging from 24 points to 2 points in size. Depending on the zoom level, a single big symbol could cover up thousands of small symbols if it is drawn higher. Likewise, thousands of small symbols could collectively completely cover a single big symbol if the small symbols are drawn above the big symbol. Neither case would be "accurate" if by "accurate" is meant a visual display that shows all objects, or which might not give somebody the wrong impression of data that is located in a given region. For example, if a person sees one big circle surrounded by many tiny dots he or she might think, "wow... only one big mountain in that region and no small ones". Conversely, a solid carpet of tiny dots might give the impression, "nope... no big mountains here, just lots of small ones...". If you construct and style a map as has been done in the example, in most regions at most zoom levels there is physically no way to avoid bigger symbols covering up smaller ones or smaller symbols covering up bigger ones. Specifying Z order within the same layer using a field is not a silver bullet to make it more "accurate" in the sense of either showing all objects or not giving false impressions, because it would just guarantee that in many zoom settings most of the data would be hidden, with up to 99.9999% of the data being hidden when zoomed far out. How can it be said that a display which fails to display 99% of the data is "accurate"? On the contrary, one could argue that the most "accurate" rendering is a display which shows the *maximum* number of objects possible. That would prioritize small symbols, because more of them can be rendered into whatever screen real estate is available than just a few big symbols. Neither of the above two extremes or the many gray areas in between can be handled by a "one size fits all" approach to rendering and none of them is really about "accuracy." All of the cases are about different choices in terms of how a given data set usefully may be shown to users even though in no case is is possible to show all of the data all of the time. Some of that is a consequence of the choice of style made by the map designer. For example, if you want to show more points in a layer without big symbols shoving many smaller symbols out of the way, well, use small symbols for all of them and indicate bigger mountains by color or symbol shape. Dealing with such tradeoffs is a routine part of cartographic design. That's why Manifold provides a wide variety of controls that allow GIS people to create a map which conveys the essence of what they want to convey despite the certain knowledge that users will pan and zoom the data to create radically different views. Controls like the ability to create multiple visual layers from the same table (data set) with individual settings for zoom ranges, styles, opacity and so on are essential tools for the cartographical task of creating a map that even at different zoom ranges does a good job of conveying the message the map's designer wants to convey. That can be time consuming, as good symbology in cartography is often very much zoom related. Very often a good design requires skilled use of zoom ranges, opacity and many different options in style. If a designer doesn't use those tools but instead puts everything into a single layer, the system starts with the "OK, everything here has equal importance" standard and tries to paint a layer that is visually digestible. That's where displaying a representative view of the layer without simply drawing a meaningless black blob comes in. If that's done wrong, you get stuff like this, which some web map rendering engine (not Manifold) produced. Note the region of solid black where too many symbols created a meaningless black blob. That's why it makes sense to clip some objects and not to attempt to show all of them if the objective is to provide a representative view of data and not a meaningless black blob. Clipping can enhance speed, of course, but really it is about avoiding visually meaningless mush. When rendering an individual layer, starting with the "all records in a layer have equal importance" essence of a layer, Manifold uses a variety of clipping algorithms on the fly to render the points, lines and areas in that layer. The result usually is a reasonable representation of the overall essence of a layer despite wide variations in zoom level. The sample .mxb provided shows that because despite variations in zoom users can see the data has a mix of bigger and smaller mountains, and in most cases can get at least a visual impression of the relative proportion between numbers of bigger and smaller mountains. If you want to get more control over display order or clipping, the first step is to use layers to do so and to use zoom ranges to turn "smaller" object layers on/off as you zoom in/out. That actually works out much better than Z ordering based on a field, because avoiding ugly displays like the black blob effect above requires clipping objects, which Z ordering by itself does not do. An example of that effect in action is the base map that is used in the Eclipses web map demo at https://manifold.net/ims9/ - as you use the mouse wheel or zoom buttons to zoom further in (try Europe) you can see how at first only bigger cities appear and then more and more smaller cities. The effect is accomplished with only four layers: the original, big populated places drawing was split out into four drawings with populations for big cities, cities, towns and places, with those four layers added to the map with different min/max zoom display ranges. That's easy to do without creating drawings from queries, but if you prefer to keep all of your data in the same table you could create multiple drawings from queries against that table to select only part of the data for each drawing. Using layers is conceptually simpler and easier for beginners than Z ordering from fields on a per object basis. Drag a layer tab left or right, with no need to use a sequence of select and transform steps to alter Z ordering numbers in a field. Move a populated place object from one layer to another by simply cutting it from one layer and pasting it into the other. Could a Z order option by field be useful within a layer? Sure, but not for what seems to be the main complaint here, which seems to be about clipping more than Z order. How Z order interacts with clipping is a complex discussion that one runs into with label engines, and it's not a case where simple rules guarantee either "accurate" (whatever that is intended to mean) displays or comprehensible displays. For example, if lower Z field value objects can never clip higher Z field objects that just guarantees only higher Z field objects will appear in the display at zoom levels where their size dominates. But they'll do that anyway given Z ordering and result in 99% of the data being hidden. In edge cases where there is a continuous range of Z ordering because it was taken from some field like the height of a mountain (inevitably what happens, since nobody is going to manually Z order 100K+ objects), there will be effects that aren't really as controllable as the use of layers because they involve slight differences between Z values in too many objects to resolve manually. You can deal with that by creating a new Z field that quantizes a continuous range of Z values into a limited number of bins, but if you're going to do that it's easier to just select based on a range of Z to create a limited number of layers, like the four layers for populated places in the eclipses map. Z ordering based on a field is one of those things that's emerged based on a desire to achieve a "one size fits all" mechanism in GIS packages like command-line driven web servers that don't have a good, interactive layers interface like Manifold. But sometimes the "pick a Z field and then curse the tool when it creates a blob", like the image posted above, shows the limitations of the approach. Just saying, there are many tradeoffs in terms of different approaches to providing a set of controls which make it easier for a map designer to create a map that conveys the impression desired despite radically varying zoom ranges. My advice is to master the tools and controls which already exist in Manifold, as they can achieve a wide range of effects based on simple approaches that are easy to learn and fast to apply. If those controls are not enough, suggest something additional. But consider carefully if that something additional does in fact fix a limitation. Attachments: blob.png
|