Comments (10)
Hi. Is there a way to do this with the current version from the .SAFE folder? I would like to use local sentinel-2 level 2A images to generate the eopatch and create the masking, ndvi and the rest of the tasks. I haven’t been able to find the way to do this. Is there any example?
from eo-learn.
Hi @pmallas, a recent PR added the ability to read from local files via the ImportFromTiff
task. It is not included in the latest release (0.4.2) but can be accessed by installing the package from github
from eo-learn.
@drewbo - thank you for the fast response. I will check it out.
Regards,
P
from eo-learn.
Hi @dfnino10,
since the format of the S2 tiles changes relatively frequently and since we mainly use the Sentinel Hub services, we haven't written any mainstream code to load the S2 tiles from disk and works for all cases.
But since the demand for this has increased lately, perhaps we might provide an example with some disclaimer code.
In the meantime, if you happen to play around with this and write some useful code of your own, don't hesitate to contribute!
Will let you know.
from eo-learn.
Hi @pmallas, a recent PR added the ability to read from local files via the
ImportFromTiff
task. It is not included in the latest release (0.4.2) but can be accessed by installing the package from github
How can I convert the ImportFromTiff object to a polygon so that I'm able to use the UTMZoneSplitter for bbox ing?
from eo-learn.
Hi @sam99dave,
When you use the import from tiff it is for importing raster images. If I understand correctly, you want to split the area, which is defined by the tiff, into smaller chunks using the splitter? Can you perhaps also provide the tiff?
from eo-learn.
Hi @sam99dave,
When you use the import from tiff it is for importing raster images. If I understand correctly, you want to split the area, which is defined by the tiff, into smaller chunks using the splitter? Can you perhaps also provide the tiff?
Yes, the tiff file I'm working on is attached in the comment.
L3-NC43Q06-099-067-24jan08-BAND4.zip
from eo-learn.
Hi @sam99dave ,
thanks for the file. If you want to extract the geometry of the tile, you can do this easily in several multiple ways:
One would be using gdalinfo
in your terminal. Part of the output that you get contains:
▶ gdalinfo L3-NC43Q06-099-067-24jan08-BAND4.tif
...
Corner Coordinates:
Upper Left ( 76.2453875, 9.7546125) ( 76d14'43.40"E, 9d45'16.61"N)
Lower Left ( 76.2453875, 9.4951875) ( 76d14'43.40"E, 9d29'42.68"N)
Upper Right ( 76.5048125, 9.7546125) ( 76d30'17.33"E, 9d45'16.61"N)
Lower Right ( 76.5048125, 9.4951875) ( 76d30'17.33"E, 9d29'42.68"N
...
which you can use in python to create a bounding box.
On the other hand, you can also import the file in QGIS and extract the extent from Vector/Research Tools/Extract Layer Extent. Then you can also save and load this as a shapefile/geojson/geopackage in python.
Let me know if you have any other issues.
from eo-learn.
Hi @sam99dave ,
thanks for the file. If you want to extract the geometry of the tile, you can do this easily in several multiple ways:
One would be using
gdalinfo
in your terminal. Part of the output that you get contains:▶ gdalinfo L3-NC43Q06-099-067-24jan08-BAND4.tif ... Corner Coordinates: Upper Left ( 76.2453875, 9.7546125) ( 76d14'43.40"E, 9d45'16.61"N) Lower Left ( 76.2453875, 9.4951875) ( 76d14'43.40"E, 9d29'42.68"N) Upper Right ( 76.5048125, 9.7546125) ( 76d30'17.33"E, 9d45'16.61"N) Lower Right ( 76.5048125, 9.4951875) ( 76d30'17.33"E, 9d29'42.68"N ...
which you can use in python to create a bounding box.
On the other hand, you can also import the file in QGIS and extract the extent from Vector/Research Tools/Extract Layer Extent. Then you can also save and load this as a shapefile/geojson/geopackage in python.
Let me know if you have any other issues.
Thank you. I'll try this.
from eo-learn.
Assuming it worked. Let us know otherwise.
Closing.
from eo-learn.
Related Issues (20)
- [BUG] ImportError: cannot import name 'PointSamplingTask' from 'eolearn.geometry' HOT 5
- SI_LULC_pipeline notebook HOT 9
- readthedocs links not working HOT 1
- [FEAT] Enable timestamp filtering from interval end towards interval start HOT 5
- [BUG] SentinelHubInputTask downloads incorrect timestamps HOT 6
- [BUG] Issue with the SpatialResizeTask in ImportTiffPipeline when using the resolution approach HOT 5
- [BUG] eo-learn installation issue due to open-cv latest update on Dec 30, 2022. HOT 2
- Registration HOT 4
- [BUG] Failing tests on MacOS related to lock-related EOExecutor tests HOT 1
- [BUG] Reading EOPatches saved with eo-learn 0.10.1 with eolearn 1.4 HOT 2
- [HELP] Where has eopatch_to_dataset gone? HOT 6
- [FEAT] TDigestTask handle nans HOT 1
- [HELP] Error when I'm trying to run land-cover-map HOT 5
- [HELP] Perform sen2cor atmospheric correction on L1C EOPatch HOT 2
- [HELP] Using eo-learn for the classification of land surface types of Ukraine HOT 23
- Why I have problems with these imports? HOT 3
- ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH HOT 3
- how do i fix this HOT 2
- CRSError in rasterio when using ExportToTiffTask HOT 6
- `eo-learn` 1.5.0 migration guide
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 eo-learn.