Exemplo n.º 1
0
        protected void collectGeometryKeys(QuadMap qmap, QuadKeyList geom_keys)
        {
            // the starting LOD is the best fit the the cell size:
            uint top_lod = getTopLod(qmap, map_layer);

            foreach (MapLayerLevelOfDetail i in map_layer.getLevels())
            {
                MapLayerLevelOfDetail level_def = i;
                uint lod = top_lod + level_def.getDepth();

                // get the extent of tiles that we will build based on the AOI:
                uint cell_xmin, cell_ymin, cell_xmax, cell_ymax;
                qmap.getCells(
                    map_layer.getAreaOfInterest(), lod,
                    cell_xmin, cell_ymin, cell_xmax, cell_ymax);

                for (uint y = cell_ymin; y <= cell_ymax; y++)
                {
                    for (uint x = cell_xmin; x <= cell_xmax; x++)
                    {
                        QuadKey key = new QuadKey(x, y, lod, qmap);
                        for (uint k = 0; k < 4; k++)
                        {
                            geom_keys.push_back(key.createSubKey(k));
                        }
                    }
                }
            }
        }
        protected void collectGeometryKeys(QuadMap qmap, QuadKeyList geom_keys)
        {
            // the starting LOD is the best fit the the cell size:
            uint top_lod = getTopLod(qmap, map_layer);

            foreach (MapLayerLevelOfDetail i in map_layer.getLevels())
            {
                MapLayerLevelOfDetail level_def = i;
                uint lod = top_lod + level_def.getDepth();

                // get the extent of tiles that we will build based on the AOI:
                uint cell_xmin, cell_ymin, cell_xmax, cell_ymax;
                qmap.getCells(
                    map_layer.getAreaOfInterest(), lod,
                    cell_xmin, cell_ymin, cell_xmax, cell_ymax);

                for (uint y = cell_ymin; y <= cell_ymax; y++)
                {
                    for (uint x = cell_xmin; x <= cell_xmax; x++)
                    {
                        QuadKey key = new QuadKey(x, y, lod, qmap);
                        for (uint k = 0; k < 4; k++)
                        {
                            geom_keys.push_back(key.createSubKey(k));
                        }
                    }
                }
            }
        }