Git Product home page Git Product logo

Comments (5)

mmann1123 avatar mmann1123 commented on May 23, 2024

Looks like the issue is data.filename, not sure if that was intentional or not. see #28

` # Open the input file on disk
def to_vrt():

with rio.open(data.filename) as src:

    with WarpedVRT(src,
                   src_crs=src.crs,                         # the original CRS
                   crs=data.crs,                            # the transformed CRS
                   src_transform=src.transform,             # the original transform
                   transform=data.transform,                # the new transform
                   dtype=data.gw.dtype,
                   resampling=resampling,
                   nodata=nodata,
                   init_dest_nodata=init_dest_nodata,
                   warp_mem_limit=warp_mem_limit) as vrt:

        rio_shutil.copy(vrt, filename, driver='VRT')`

from geowombat.

jgrss avatar jgrss commented on May 23, 2024

Thanks for catching this. The filename attribute is a geowombat attribute. I replaced data.filename with data.gw.filename in 4d50e2e.

from geowombat.

mmann1123 avatar mmann1123 commented on May 23, 2024

New issue...

with gw.open(glob('./data/NDWI/*2020*tif'), band_names=['NDWI'],
             time_names=['01-01-2020'],
             bounds_by='union',mosaic=True,
             num_workers=5) as ds:
       print(ds)
       # Write the data to a VRT
       ds.gw.to_vrt('./data/NDWI/NDWI_01-01-2020.vrt')
  File "/home/mmann1123/anaconda3/envs/geowombat/lib/python3.7/site-packages/geowombat/core/io.py", line 366, in to_vrt
    with rio.open(data.gw.filename) as src:

AttributeError: 'GeoWombatAccessor' object has no attribute 'filename'

Not sure if this is related but it seems like you have two class definitions for GeoWombatAccessor

from geowombat.

jgrss avatar jgrss commented on May 23, 2024

Yeah, that will have to be an enhancement. At the moment, the geowombat.to_vrt() function only supports a single raster input file from geowombat.open().

from geowombat.

jgrss avatar jgrss commented on May 23, 2024

I am closing this issue and will open a new one specific to the enhancement of using multiple files with to_vrt().

from geowombat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.