示例#1
0
        public static void QuadKeyToGeoCoordinate(string quadKey, out double quadKeyLatitude, out double quadKeyLongitude, out int quadKeyLevelOfDetail)
        {
            int pixelX, pixelY;
            int tileX, tileY;

            GeoTileTool.QuadKeyToTileXY(quadKey, out tileX, out tileY, out quadKeyLevelOfDetail);
            GeoTileTool.TileXYToPixelXY(tileX, tileY, out pixelX, out pixelY);
            GeoTileTool.PixelXYToLatLong(pixelX, pixelY, quadKeyLevelOfDetail, out quadKeyLatitude, out quadKeyLongitude);
        }
示例#2
0
        public static bool ValidateQuadKey(long quadKey)
        {
            bool isValid = false;
            int  tileX, tileY;
            int  quadKeyLevelOfDetail;

            //Specifying 19 as lelvel of detail
            string sQuadKey = quadKey.ToString("0000000000000000000");

            isValid = GeoTileTool.QuadKeyToTileXY(sQuadKey, out tileX, out tileY, out quadKeyLevelOfDetail);
            return(isValid);
        }