Comments (4)
I totally agree with that. So from a user's perspective we would call something like this:
img = Image(array=myarray, crs=mycrs, transform=mytransform, dimorder="first")
This would be more meaningful, less confusing and more flexible (I like the link to easily go from GDAL to ukis-pysat).
from ukis-pysat.
OT: Please be aware that you are quoting an old version of write_to_file()
.
I also don't quite understand what you're doing, img
is not a dataset. This method is also not meant to write a new array to file, at least that's not how I intended it, for such purposes I would suggest using rasterio directly with something like this:
with rasterio.open(
destination,
"w",
driver="GTiff",
width=ndvi_arr.shape[-1],
height=ndvi_arr.shape[-2],
count=1,
dtype=np.float32,
transform=self.transform,
) as dst:
dst.write(ndvi_arr, indexes=1)
from ukis-pysat.
Just edited the above comment. Should be img.dataset
.
from ukis-pysat.
The dataset is not the dataset you're looking for and this all becomes very confusing then. But I agree that it is very inviting to do something like that.
As an alternative we could consider something else:
Instead of initializing Image
with a dataset
(itself confusing, GDAL datasets will not work I guess) and array
we could initalize it with crs
, affine_transform
and array
. Then we could use an adaption of __update_dataset()
to create the correct dataset internally. This would also be nice to go from GDAL to ukis-pysat in memory because you just have to convert the transform.
from ukis-pysat.
Related Issues (20)
- Use mock requests for testing
- Fix skipped unittests
- According to Specs Wrong datetime used
- Querying metadata should return an iterator instead of a catalog
- Test different STAC API endpoints HOT 1
- Evaluate stactools HOT 5
- Remove platform from download_image()
- Evaluate more STAC extensions HOT 1
- Expose streaming possibility HOT 2
- download_image error using EarthExplorer
- Update OA hub URL
- Update Readme HOT 1
- Add tests for #144
- Download Method Conflict in SCIHUB and EARTHEXPLORER HOT 3
- Follow STAC best practices HOT 3
- Use pystac-client instead of own implementation HOT 2
- Properly use USGS M2M also for downloading
- Update dependencies
- Sentinel-2 DN2TOA conversion incorrect for images after January 2022
- Deprecate Data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ukis-pysat.