hypertidy/ceramic

provide VRT writer for tile sets

mdsumner opened this issue · 2 comments

We will need to use VRT for really big tile sets, and with control from #8 that becomes more important.

  • raster doesn't have any lazy merge capability, but it works with VRT as does stars
  • stars proxy possibly
  • our own lazy tile table?

It would be better to not do merging to a single PNG in R, though maybe magick

To do this we need to convert every band of every tile into this form

  <VRTRasterBand dataType="Byte" band="1">
    <ColorInterp>Red</ColorInterp>
    <SimpleSource>
      <SourceFilename relativeToVRT="1">tile1.png</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="524" RasterYSize="256" DataType="Byte" BlockXSize="524" BlockYSize="1" />
      <SrcRect xOff="0" yOff="0" xSize="524" ySize="256" />
      <DstRect xOff="0" yOff="0" xSize="524" ySize="256" />
    </SimpleSource>
    <SimpleSource>
      <SourceFilename relativeToVRT="1">tile2.png</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="524" RasterYSize="269" DataType="Byte" BlockXSize="524" BlockYSize="1" />
      <SrcRect xOff="0" yOff="0" xSize="524" ySize="269" />
      <DstRect xOff="0" yOff="256" xSize="524" ySize="269" />
    </SimpleSource>
  </VRTRasterBand>
  <VRTRasterBand dataType="Byte" band="2">

ceramic_tiles has the right information, but it needs to be done at user-request with cc_location.

  • converter for extent/dim of child within extent/dim parent to VRT format above
  • use absolute file path
  • subvert cc_location with a more raw tile_downloader that returns VRT and file list (perhaps the ceramic_tiles table, and the VRT text or temp file, or an extra writer for that)

this would be better done directly with GDAL, but I think GDAL's cache is not in tile format (sadly, not sure if it can be?) #20

This issue per se is more "ceramic should just load tiles, raster or whatever should read and plot them".