private TIntObjectHashMap<TIntArrayList> sortObjectsByProperOrder( RenderingContext rc, List<BinaryMapDataObject> objects, RenderingRuleSearchRequest render) { int sz = objects.size(); TIntObjectHashMap<TIntArrayList> orderMap = new TIntObjectHashMap<TIntArrayList>(); if (render != null) { render.clearState(); for (int i = 0; i < sz; i++) { BinaryMapDataObject o = objects.get(i); int sh = i << 8; for (int j = 0; j < o.getTypes().length; j++) { // put(orderMap, BinaryMapDataObject.getOrder(o.getTypes()[j]), sh + j, init); int wholeType = o.getTypes()[j]; int layer = 0; if (o.getPointsLength() > 1) { layer = o.getSimpleLayer(); } TagValuePair pair = o.getMapIndex().decodeType(wholeType); if (pair != null) { render.setTagValueZoomLayer(pair.tag, pair.value, rc.zoom, layer, o); render.setBooleanFilter(render.ALL.R_AREA, o.isArea()); render.setBooleanFilter(render.ALL.R_POINT, o.getPointsLength() == 1); render.setBooleanFilter(render.ALL.R_CYCLE, o.isCycle()); if (render.search(RenderingRulesStorage.ORDER_RULES)) { int objectType = render.getIntPropertyValue(render.ALL.R_OBJECT_TYPE); int order = render.getIntPropertyValue(render.ALL.R_ORDER); put(orderMap, (order << 2) | objectType, sh + j); if (objectType == 3) { // add icon point all the time put(orderMap, (128 << 2) | 1, sh + j); } if (render.isSpecified(render.ALL.R_SHADOW_LEVEL)) { rc.shadowLevelMin = Math.min(rc.shadowLevelMin, order); rc.shadowLevelMax = Math.max(rc.shadowLevelMax, order); render.clearValue(render.ALL.R_SHADOW_LEVEL); } } } } if (rc.interrupted) { return orderMap; } } } return orderMap; }
public RenderingRuleSearchRequest(RenderingRulesStorage storage) { this.storage = storage; this.ALL = storage.PROPS; props = storage.PROPS.getPoperties(); values = new int[props.length]; for (int i = 0; i < props.length; i++) { if (!props[i].isColor()) { values[i] = -1; } } fvalues = new float[props.length]; setBooleanFilter(storage.PROPS.R_TEST, true); saveState(); }