乐于分享
好东西不私藏

GeoAI处理栅格源码分析

GeoAI处理栅格源码分析

概述

核心定位

raster.py 是 GeoAI 的栅格数据处理核心工具集,本质是对 rasterio + GDAL 的工程封装,提供完整的栅格数据处理流水线。

功能架构

架构图

核心功能模块

模块分类总览

模块
核心函数
作用
元数据read_raster_metadata
读取影像基本信息(不加载像素)
统计calc_stats
get_raster_stats
计算 mean/std 等统计值
信息展示get_raster_info
print_raster_info
打印信息、可视化预览
裁剪clip_raster_by_bbox
按边界框裁剪栅格
栅格→矢量raster_to_vector
raster_to_vector_batch
矢量化(polygonize)
矢量→栅格vector_to_raster
batch_vector_to_raster
栅格化(rasterize)
拼接mosaic_geotiffs
多影像拼接成 COG
波段堆叠stack_bands
多单波段影像堆叠
高级处理clean_instance_mask
实例分割结果优化
IOread_raster
read_vector
统一读写入口

关键函数详解

1. 元数据读取

read_raster_metadata

defread_raster_metadata(raster_path: str) -> RasterMetadata:"""    读取栅格元数据(不加载像素数据)    参数:        raster_path: 栅格文件路径    返回:        RasterMetadata 命名元组,包含:        - crs: 坐标参考系统        - transform: 地理变换矩阵        - bounds: 地理边界        - width/height: 影像尺寸        - count: 波段数        - dtype: 数据类型        - nodata: 无数据值        - driver: 文件格式    """with rasterio.open(raster_path) as src:return RasterMetadata(            crs=src.crs,            transform=src.transform,            bounds=src.bounds,            width=src.width,            height=src.height,            count=src.count,            dtype=src.dtypes[0],            nodata=src.nodata,            driver=src.driver,        )

设计要点

  • • 使用 rasterio.open() 但不读取像素,性能高效
  • • 返回结构化的 NamedTuple,类型安全
  • • 避免频繁打开文件造成的性能开销

2. 统计计算

calc_stats

defcalc_stats(    image_files: List[str],    max_samples: int = 1000,    eps: float = 1e-6,) -> Tuple[np.ndarray, np.ndarray]:"""    计算数据集的 mean 和 std(近似统计)    参数:        image_files: 影像文件列表        max_samples: 最大采样数(防止内存溢出)        eps: 防止除零的小值    返回:        (mean, std) 数组    """    n_channels = None    total_sum = None    total_sum_sq = None    count = 0for f in image_files:with rasterio.open(f) as src:if n_channels isNone:                n_channels = src.count                total_sum = np.zeros(n_channels)                total_sum_sq = np.zeros(n_channels)# 随机采样防止内存溢出            data = src.read()            data = data.reshape((n_channels, -1))            samples = min(data.shape[1], max_samples // len(image_files))if samples > 0:                idx = np.random.choice(data.shape[1], samples, replace=False)                sampled = data[:, idx]                total_sum += sampled.sum(axis=1)                total_sum_sq += (sampled ** 2).sum(axis=1)                count += samples    mean = total_sum / count    std = np.sqrt(total_sum_sq / count - mean ** 2 + eps)return mean, std

设计要点

  • • 随机采样策略:防止一次性加载大数据集导致内存溢出
  • • 近似统计:通过采样计算整体统计值,牺牲精度换取性能
  • • 数值稳定性:添加 eps 防止标准差计算时除零

3. 栅格裁剪(重点)

clip_raster_by_bbox

defclip_raster_by_bbox(    input_raster: str,    output_raster: str,    bbox: List[float],    bands: Optional[List[int]] = None,    bbox_type: str = "geo",  # "geo" 或 "pixel"    bbox_crs: Optional[str] = None,) -> str:"""    按边界框裁剪栅格    参数:        input_raster: 输入栅格路径        output_raster: 输出栅格路径        bbox: 边界框坐标        bands: 要保留的波段列表(可选)        bbox_type: 边界框类型(地理坐标/像素坐标)        bbox_crs: 边界框的 CRS(跨 CRS 裁剪时使用)    返回:        输出栅格路径    """from rasterio.warp import transform_boundswith rasterio.open(input_raster) as src:        src_crs = src.crsif bbox_type == "geo":            minx, miny, maxx, maxy = bbox# 跨 CRS 坐标转换(关键)if bbox_crs isnotNoneand bbox_crs != src_crs:                minx, miny, maxx, maxy = transform_bounds(                    bbox_crs, src_crs, minx, miny, maxx, maxy                )# 生成裁剪窗口            window = src.window(minx, miny, maxx, maxy)else:  # 像素坐标裁剪            min_row, min_col, max_row, max_col = bbox            window = Window(min_col, min_row, max_col - min_col, max_row - min_row)# 读取并写出        data = src.read(window=window) if bands isNoneelse src.read(bands, window=window)with rasterio.open(output_raster, "w", **out_meta) as dst:            dst.write(data)return output_raster

核心流程

bbox(地理/像素)→ 坐标转换(跨CRS)→ window → read(window) → write

支持的裁剪模式

模式
参数格式
适用场景
geo(minx, miny, maxx, maxy)
按地理范围裁剪
pixel(min_row, min_col, max_row, max_col)
按像素范围裁剪

4. 栅格→矢量(GeoAI核心)

raster_to_vector

defraster_to_vector(    raster_path: str,    output_path: Optional[str] = None,    threshold: float = 0,    min_area: float = 10,    simplify_tolerance: Optional[float] = None,    class_values: Optional[List[int]] = None,    attribute_name: str = "class",    output_format: str = "geojson",) -> gpd.GeoDataFrame:"""    将栅格标签转换为矢量多边形(polygonize)    参数:        raster_path: 输入栅格路径        output_path: 输出矢量路径(可选)        threshold: 二值化阈值        min_area: 最小多边形面积(过滤噪点)        simplify_tolerance: 几何简化容差        class_values: 指定要矢量化的类别值列表        attribute_name: 属性字段名        output_format: 输出格式(geojson/shapefile/gpkg)    返回:        GeoDataFrame 包含矢量化的多边形    """with rasterio.open(raster_path) as src:        data = src.read(1)        transform = src.transform        crs = src.crs        all_features = []if class_values isnotNone:# 按指定类别矢量化for class_val in class_values:                mask = (data == class_val)for geom, value in features.shapes(                    mask.astype(np.uint8), mask=mask, transform=transform                ):                    geom = shape(geom)if geom.area < min_area:continueif simplify_tolerance isnotNone:                        geom = geom.simplify(simplify_tolerance)                    all_features.append({"geometry": geom, attribute_name: class_val})else:# 全局矢量化            binary_mask = (data > threshold).astype(np.uint8)for geom, value in features.shapes(                data.astype(np.int32), mask=binary_mask, transform=transform            ):                class_val = int(value)if class_val == 0:continue# ... 同样的过滤和简化处理        gdf = gpd.GeoDataFrame(all_features, crs=crs)if output_path isnotNone:            gdf.to_file(output_path, driver="GeoJSON")return gdf

核心APIfeatures.shapes() - GDAL 的 polygonize 实现

关键处理步骤

步骤
处理内容
作用
1
features.shapes()
将栅格转换为多边形
2
面积过滤
移除小噪点
3
几何简化
simplify()
 减少顶点数
4
CRS处理
确保地理坐标正确

5. 矢量→栅格(训练标签核心)

vector_to_raster

defvector_to_raster(    vector_path: Union[str, gpd.GeoDataFrame],    output_path: Optional[str] = None,    reference_raster: Optional[str] = None,    attribute_field: Optional[str] = None,    output_shape: Optional[Tuple[intint]] = None,    transform: Optional[Any] = None,    pixel_size: Optional[float] = None,    bounds: Optional[List[float]] = None,    crs: Optional[str] = None,) -> np.ndarray:"""    将矢量数据转换为栅格(rasterize)    参数:        vector_path: 输入矢量路径或 GeoDataFrame        output_path: 输出栅格路径(可选)        reference_raster: 参考栅格(自动继承尺寸和变换)        attribute_field: 属性字段(用于像素值)        output_shape: 输出尺寸(高, 宽)        transform: 地理变换矩阵        pixel_size: 像素大小        bounds: 输出边界        crs: 坐标参考系统    返回:        栅格化后的 numpy 数组    """# 加载矢量数据    gdf = gpd.read_file(vector_path) ifisinstance(vector_path, strelse vector_path# 从参考栅格获取参数(最常用方式)if reference_raster isnotNone:with rasterio.open(reference_raster) as src:            transform = src.transform            output_shape = src.shape            crs = src.crs# CRS对齐if gdf.crs != crs:        gdf = gdf.to_crs(crs)# 构造 rasterize 输入    shapes = [(geom, value) for geom, value inzip(gdf.geometry, gdf[attribute_field])]# 栅格化    burned = features.rasterize(        shapes=shapes,        out_shape=output_shape,        transform=transform,        fill=0,        dtype=np.uint8,    )if output_path isnotNone:with rasterio.open(output_path, "w", **metadata) as dst:            dst.write(burned, 1)return burned

三种输入方式

方式
参数
适用场景
参考影像
reference_raster
保持与影像对齐(最常用)
手动指定
transform + output_shape
自定义输出尺寸
边界+像素大小
bounds + pixel_size
自动计算变换

核心APIfeatures.rasterize() - GDAL 的 rasterize 实现


6. 影像拼接

mosaic_geotiffs

defmosaic_geotiffs(    input_files: List[str],    output_path: str,    crs: Optional[str] = None,    resolution: Optional[Tuple[floatfloat]] = None,    nodata: Optional[float] = None,) -> str:"""    将多个 GeoTIFF 文件拼接为一个文件    参数:        input_files: 输入文件列表        output_path: 输出文件路径        crs: 输出 CRS(可选)        resolution: 输出分辨率(可选)        nodata: 无数据值(可选)    返回:        输出文件路径    """# 使用 GDAL 构建 VRT    vrt_path = "temp.vrt"    gdal.BuildVRT(vrt_path, input_files)# 转换为 GeoTIFF    gdal.Translate(output_path, vrt_path, format="GTiff", creationOptions=["COMPRESS=DEFLATE"])# 可选:构建金字塔with rasterio.open(output_path, "r+"as dst:        dst.build_overviews([24816])return output_path

核心流程

多个 GeoTIFF → VRT(虚拟栅格)→ Translate → 金字塔 → COG

7. 波段堆叠

stack_bands

defstack_bands(    input_files: List[str],    output_file: str,    resolution: Optional[float] = None,    dtype: Optional[str] = None,) -> str:"""    将多个单波段影像堆叠为多波段影像    参数:        input_files: 输入文件列表(按波段顺序)        output_file: 输出文件路径        resolution: 输出分辨率        dtype: 输出数据类型    返回:        输出文件路径    """# 构建 VRT    vrt_cmd = ["gdalbuildvrt""-separate""stack.vrt"] + input_files    subprocess.run(vrt_cmd, check=True)# 转换为多波段 GeoTIFF    translate_cmd = ["gdal_translate","-tr"str(resolution), str(resolution),"stack.vrt", output_file,"-of""COG",    ]    subprocess.run(translate_cmd, check=True)return output_file

8. 实例分割结果优化

clean_instance_mask

defclean_instance_mask(    input_path: str,    output_path: Optional[str] = None,    min_area: int = 50,    fill_holes: bool = True,    max_hole_area: int = 100,    smooth: bool = True,    smooth_sigma: float = 1.5,) -> str:"""    清理实例分割掩码(保留实例身份)    参数:        input_path: 输入掩码路径        output_path: 输出路径(可选)        min_area: 最小实例面积        fill_holes: 是否填充孔洞        max_hole_area: 最大填充孔洞面积        smooth: 是否平滑边界        smooth_sigma: 高斯平滑参数    返回:        输出路径    """with rasterio.open(input_path) as src:        mask = src.read(1)# 1. 删除小实例    labeled, num_labels = measure.label(mask, connectivity=2, return_num=True)    props = measure.regionprops(labeled)for prop in props:if prop.area < min_area:            mask[labeled == prop.label] = 0# 2. 填充孔洞if fill_holes:        holes = mask == 0        labeled_holes, _ = ndi.label(holes)for prop in measure.regionprops(labeled_holes):if prop.area < max_hole_area:                coords = prop.coords# 填充为周围区域的值                ...# 3. 平滑边界if smooth:        mask = gaussian_filter(mask.astype(float), sigma=smooth_sigma)if output_path isnotNone:with rasterio.open(output_path, "w", **meta) as dst:            dst.write(mask.astype(np.uint8), 1)return output_path

处理步骤

步骤
处理内容
作用
1
删除小实例
移除噪点
2
填充孔洞
修复实例内部空洞
3
高斯平滑
平滑边界
4
NMS去重
去除重叠实例

使用示例

示例 1:元数据读取

import geoai# 读取元数据(不加载像素)metadata = geoai.read_raster_metadata("satellite.tif")print(f"影像尺寸: {metadata.width} x {metadata.height}")print(f"波段数: {metadata.count}")print(f"坐标系统: {metadata.crs}")print(f"数据类型: {metadata.dtype}")print(f"地理边界: {metadata.bounds}")

示例 2:统计计算

import geoaiimport glob# 获取数据集统计image_files = glob.glob("dataset/*.tif")mean, std = geoai.calc_stats(image_files)print(f"Mean: {mean}")print(f"Std: {std}")# 单影像统计stats = geoai.get_raster_stats("image.tif")print(f"波段1 均值: {stats['mean'][0]:.2f}")print(f"波段1 标准差: {stats['std'][0]:.2f}")

示例 3:栅格裁剪

import geoai# 方式1:地理坐标裁剪geoai.clip_raster_by_bbox(    input_raster="input.tif",    output_raster="clipped_geo.tif",    bbox=[116.039.0116.539.5],  # (minx, miny, maxx, maxy)    bbox_type="geo",    bbox_crs="EPSG:4326",  # WGS84    bands=[123]  # 只保留 RGB 波段)# 方式2:像素坐标裁剪geoai.clip_raster_by_bbox(    input_raster="input.tif",    output_raster="clipped_pixel.tif",    bbox=[00512512],  # (min_row, min_col, max_row, max_col)    bbox_type="pixel")

示例 4:栅格→矢量

import geoai# 将分类结果矢量化gdf = geoai.raster_to_vector(    raster_path="classification.tif",    output_path="polygons.geojson",    threshold=0.5,           # 二值化阈值    min_area=100,            # 最小面积过滤    simplify_tolerance=2.0,  # 几何简化    class_values=[123]   # 只矢量化类别1、2、3)print(f"生成了 {len(gdf)} 个多边形")

示例 5:矢量→栅格

import geoai# 方式1:使用参考栅格(最常用)geoai.vector_to_raster(    vector_path="buildings.geojson",    output_path="buildings_mask.tif",    reference_raster="satellite.tif",  # 自动对齐    attribute_field="class"# 使用 class 字段作为像素值)# 方式2:手动指定参数geoai.vector_to_raster(    vector_path="roads.geojson",    output_path="roads_mask.tif",    output_shape=(10001000),    transform=src.transform,    crs="EPSG:32650",    attribute_field="road_type")

示例 6:影像拼接

import geoaiimport glob# 拼接多个影像input_files = glob.glob("tiles/*.tif")geoai.mosaic_geotiffs(    input_files=input_files,    output_path="mosaic.tif",    crs="EPSG:32650",    resolution=(1.01.0))print("拼接完成!")

示例 7:波段堆叠

import geoai# 将单波段影像堆叠为多波段geoai.stack_bands(    input_files=["band1.tif""band2.tif""band3.tif""band4.tif"],    output_file="stacked.tif",    resolution=1.0,    dtype="UInt16")print("波段堆叠完成!")

示例 8:实例分割结果优化

import geoai# 清理实例分割掩码geoai.clean_instance_mask(    input_path="instance_mask.tif",    output_path="cleaned_mask.tif",    min_area=50,           # 最小实例面积    fill_holes=True,       # 填充孔洞    max_hole_area=100,     # 最大孔洞面积    smooth=True,           # 平滑边界    smooth_sigma=1.5# 平滑参数)print("实例掩码清理完成!")

工程架构总结

核心技术栈

GeoAI raster 模块 =    rasterio(栅格读写/窗口操作)    + GDAL(拼接/格式转换/COG)    + numpy(数组处理)    + geopandas(矢量处理)    + scipy(图像处理)

设计特点

特点
说明
工程级封装
将复杂的 GIS 操作封装为简单 API
内存优化
采样统计、窗口读取避免内存溢出
类型安全
使用 NamedTuple 和类型提示
自动对齐
矢栅互转时自动处理 CRS
多格式支持
支持 GeoTIFF、GeoJSON、Shapefile、GPKG 等

典型工作流

1. 数据准备   └── download → clip → mosaic → stack_bands2. 训练数据生成   └── vector_to_raster(标签栅格化)3. 推理后处理   └── raster_to_vector(结果矢量化)→ clean_instance_mask(优化)4. 数据分析   └── read_raster_metadata → calc_stats → visualize
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-05-14 07:16:04 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/621982.html
  2. 运行时间 : 0.241517s [ 吞吐率:4.14req/s ] 内存消耗:4,906.55kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=33a210b3d83c6efb9fb343af8cbf432e
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001250s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.002104s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000905s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000703s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001768s ]
  6. SELECT * FROM `set` [ RunTime:0.000643s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001954s ]
  8. SELECT * FROM `article` WHERE `id` = 621982 LIMIT 1 [ RunTime:0.001463s ]
  9. UPDATE `article` SET `lasttime` = 1778714164 WHERE `id` = 621982 [ RunTime:0.028241s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.004157s ]
  11. SELECT * FROM `article` WHERE `id` < 621982 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001238s ]
  12. SELECT * FROM `article` WHERE `id` > 621982 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002542s ]
  13. SELECT * FROM `article` WHERE `id` < 621982 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.008063s ]
  14. SELECT * FROM `article` WHERE `id` < 621982 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.004091s ]
  15. SELECT * FROM `article` WHERE `id` < 621982 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003951s ]
0.245451s