protected override void ThreadFunction() { if (goTile.useElevation) { goTile.elevatedTerrainMesh(); } tT = DateTime.Now; var decompressed = Mapbox.Utils.Compression.Decompress(goTile.getVectorData()); VectorTile vt = new VectorTile(decompressed, false); ////DEBUG TO GEOJSON //string debug = vt.ToGeoJson((ulong)goTile.zoomLevel, (ulong)goTile.tileCoordinates.x, (ulong)goTile.tileCoordinates.y, 0); //FileHandler.SaveText("DEBUG_TILE", debug); //DEBUG LAYERS //foreach (string lyr in vt.LayerNames()) //{ // Debug.Log(lyr); //} list = new List <GOParsedLayer> (); //Sort layers so that the order is right for dropping environment Array.Sort(layers, (GOLayer a, GOLayer b) => GOLayer.LayerTypeToIndex(a.layerType).CompareTo(GOLayer.LayerTypeToIndex(b.layerType))); foreach (GOLayer layer in layers) { if (layer.disabled) { continue; } ParseGOLayerToList(list, vt, layer); } tF = DateTime.Now; if (tile.map.pois != null && (tile.map.pois.renderingOptions.Length > 0 && !tile.map.pois.disabled)) { ParsePOILayerToList(list, vt, tile.map.pois); } tP = DateTime.Now; if (tile.map.labels != null && !tile.map.labels.disabled) { ParseLabelLayerToList(list, vt, tile.map.labels); } tL = DateTime.Now; if (tile.map.customMapboxTilesets != null && tile.map.customMapboxTilesets.Length > 0) { ParseTilesetsToList(list, vt, tile.map.customMapboxTilesets); } tTS = DateTime.Now; }
protected override void ThreadFunction() { if (goTile.useElevation) { goTile.elevatedTerrainMesh(); } tT = DateTime.Now; var decompressed = Mapbox.Utils.Compression.Decompress(goTile.getVectorData()); VectorTile vt = new VectorTile(decompressed, false); //DEBUG TO GEOJSON // string debug = vt.ToGeoJson ((ulong)goTile.zoomLevel, (ulong)goTile.tileCoordinates.x, (ulong)goTile.tileCoordinates.y,0); // FileHandler.SaveText ("DEBUG_TILE", debug); //DEBUG LAYERS // foreach (string lyr in vt.LayerNames()) { // Debug.Log (lyr); // } list = new List <GOParsedLayer> (); // goTile.roadNetwork = new GORoadNetwork (); foreach (GOLayer layer in layers) { if (layer.disabled) { continue; } ParseGOLayerToList(list, vt, layer); } tF = DateTime.Now; if (tile.map.pois != null && (tile.map.pois.renderingOptions.Length > 0 && !tile.map.pois.disabled)) { ParsePOILayerToList(list, vt, tile.map.pois); } tP = DateTime.Now; if (tile.map.labels != null && !tile.map.labels.disabled) { ParseLabelLayerToList(list, vt, tile.map.labels); } tL = DateTime.Now; }