remove 'heigh','minHeight' fields from MapElement
This commit is contained in:
parent
5775c8cbf3
commit
7c090e921a
@ -28,9 +28,12 @@ package org.oscim.core;
|
||||
*/
|
||||
public class MapElement extends GeometryBuffer {
|
||||
|
||||
// OSM layer of the way.
|
||||
/** OSM layer of the way */
|
||||
public int layer;
|
||||
|
||||
/** priority for labeling */
|
||||
public int priority;
|
||||
|
||||
public final TagSet tags = new TagSet();
|
||||
|
||||
public MapElement() {
|
||||
@ -49,10 +52,4 @@ public class MapElement extends GeometryBuffer {
|
||||
public void clear() {
|
||||
super.clear();
|
||||
}
|
||||
|
||||
// ---- random stuff, to be removed ----
|
||||
// building tags
|
||||
public int height;
|
||||
public int minHeight;
|
||||
public int priority;
|
||||
}
|
||||
|
||||
@ -347,16 +347,6 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
||||
public void renderArea(Area area, int level) {
|
||||
int numLayer = mDrawingLayer + level;
|
||||
|
||||
if (mRenderBuildingModel) {
|
||||
//Log.d(TAG, "add buildings: " + mTile + " " + mPriority);
|
||||
if (mTile.layers.extrusionLayers == null)
|
||||
mTile.layers.extrusionLayers = new ExtrusionLayer(0, mGroundScale);
|
||||
|
||||
((ExtrusionLayer) mTile.layers.extrusionLayers).addBuildings(mElement);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PolygonLayer layer = mTile.layers.getPolygonLayer(numLayer);
|
||||
|
||||
if (layer == null)
|
||||
|
||||
@ -75,14 +75,11 @@ public class ExtrusionLayer extends RenderElement {
|
||||
mClipper = new LineClipper(0, 0, Tile.SIZE, Tile.SIZE);
|
||||
}
|
||||
|
||||
public void addBuildings(MapElement element) {
|
||||
public void add(MapElement element, float height, float minHeight) {
|
||||
|
||||
short[] index = element.index;
|
||||
float[] points = element.points;
|
||||
|
||||
float height = element.height;
|
||||
float minHeight = element.minHeight;
|
||||
|
||||
// 12m default
|
||||
if (height == 0)
|
||||
height = 12 * 100;
|
||||
|
||||
@ -19,6 +19,7 @@ import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.oscim.backend.Log;
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
@ -31,8 +32,6 @@ import org.oscim.tiling.source.common.PbfDecoder;
|
||||
import org.oscim.tiling.source.common.PbfTileDataSource;
|
||||
import org.oscim.tiling.source.common.UrlTileSource;
|
||||
|
||||
import org.oscim.backend.Log;
|
||||
|
||||
public class OSciMap2TileSource extends UrlTileSource {
|
||||
|
||||
@Override
|
||||
@ -203,8 +202,8 @@ public class OSciMap2TileSource extends UrlTileSource {
|
||||
|
||||
mElem.layer = 5;
|
||||
mElem.priority = 0;
|
||||
mElem.height = 0;
|
||||
mElem.minHeight = 0;
|
||||
//mElem.height = 0;
|
||||
//mElem.minHeight = 0;
|
||||
|
||||
while (position() < end) {
|
||||
// read tag and wire type
|
||||
@ -247,11 +246,13 @@ public class OSciMap2TileSource extends UrlTileSource {
|
||||
break;
|
||||
|
||||
case TAG_ELEM_HEIGHT:
|
||||
mElem.height = decodeVarint32();
|
||||
//mElem.height =
|
||||
decodeVarint32();
|
||||
break;
|
||||
|
||||
case TAG_ELEM_MIN_HEIGHT:
|
||||
mElem.minHeight = decodeVarint32();
|
||||
//mElem.minHeight =
|
||||
decodeVarint32();
|
||||
break;
|
||||
|
||||
case TAG_ELEM_PRIORITY:
|
||||
|
||||
@ -18,6 +18,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.oscim.backend.Log;
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
@ -26,8 +27,6 @@ import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.source.ITileDataSink;
|
||||
import org.oscim.tiling.source.common.PbfDecoder;
|
||||
|
||||
import org.oscim.backend.Log;
|
||||
|
||||
public class TileDecoder extends PbfDecoder {
|
||||
private final static String TAG = TileDecoder.class.getName();
|
||||
|
||||
@ -264,8 +263,6 @@ public class TileDecoder extends PbfDecoder {
|
||||
|
||||
mElem.layer = 5;
|
||||
mElem.priority = 0;
|
||||
mElem.height = 0;
|
||||
mElem.minHeight = 0;
|
||||
|
||||
while (position() < end) {
|
||||
// read tag and wire type
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user