Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Write GDAL multidimensional VRT from xarray Datasets and STAC catalogues. Pure Python: no GDAL needed to write.
Documentation: https://hypertidy.github.io/xvrt/
A multidimensional VRT is a small XML file that describes a collection of files as one n-dimensional dataset: which file supplies which slab of which array, plus dimensions, coordinates, CRS, units and packing. It holds no data. Any reader of GDAL's multidimensional API opens the whole collection as a single cube and reads only the files a request touches.
pip install xvrt
pip install "xvrt[stac]" # adds pyarrow and pyproj for from_stac()
Reading the result needs GDAL 3.x with multidimensional support (for example GDAL's Python bindings from conda-forge).
Open files the way you normally would, then describe the result:
import glob
import xarray as xr
from xvrt import write_mdim_vrt
paths = sorted(glob.glob("oisst-avhrr-v02r01.*.nc")) # one day per file
ds = xr.open_mfdataset(paths, combine="nested", concat_dim="time")
write_mdim_vrt(ds, paths, "oisst.vrt", composition="concat", concat_dim="time")
The same works over HTTP. Ten monthly files of one variable from a THREDDS
server (URLs become /vsicurl/ sources):
PREFIX = "https://thredds.nci.org.au/thredds/fileServer/gb6/BRAN/BRAN2020/daily"
months = [f"2010_{m:02d}" for m in range(1, 11)]
paths = [f"{PREFIX}/ocean_temp_{ym}.nc" for ym in months]
ds = xr.open_mfdataset(paths, engine="h5netcdf")
write_mdim_vrt(ds[["temp"]], paths, "bran.vrt",
composition="concat", concat_dim="Time")
from_stac() builds the VRT from catalogue fields alone (grid, CRS, item
datetimes, per-asset band storage) without opening a file:
from xvrt import from_stac
from_stac("https://data.source.coop/ausantarctic/ghrsst-mur-v2/ghrsst-mur-v2.parquet",
"mur.vrt", block_size=[1, 512, 512])
For the GHRSST MUR collection that is five arrays over 8913 days in a few seconds.
concat (files already have the dimension) and stack
(one file per position of a new dimension), with explicit positions and
gaps..encoding, so GDAL decodes the stored bytes exactly as xarray did.<SourceBand> and
<SourceTranspose>.<SourceSlab>), so a read
opens only the files it needs.<SRS> with the data-axis-to-SRS-axis mapping computed from the
WKT axis order.gdal mdim info oisst.vrt
from osgeo import gdal
ds = gdal.OpenEx("oisst.vrt", gdal.OF_MULTIDIM_RASTER)
sst = ds.GetRootGroup().OpenMDArray("sst").GetUnscaled()
or with an xarray backend for GDAL, such as
gdalxarray:
xr.open_dataset("oisst.vrt", engine="gdalxarray").
pip install -e ".[test]"
pytest tests/
tests/test_gdal_roundtrip.py reads every written VRT back through GDAL and
validates it against GDAL's schema (schema/gdalvrt.xsd); it is skipped when
osgeo.gdal is not importable. With conda-forge:
micromamba create -n xvrt -c conda-forge python gdal libgdal-netcdf xarray netcdf4 h5netcdf dask lxml pyarrow pyproj pytest
The design notes are in mdim-vrt-writer-plan.md; the documentation site source is in docs/.
MIT