Git Product home page Git Product logo

Comments (10)

dfnino10 avatar dfnino10 commented on July 19, 2024 1

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.

drewbo avatar drewbo commented on July 19, 2024

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.

pmallas avatar pmallas commented on July 19, 2024

@drewbo - thank you for the fast response. I will check it out.
Regards,
P

from eo-learn.

mlubej avatar mlubej commented on July 19, 2024

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.

sam99dave avatar sam99dave commented on July 19, 2024

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.

mlubej avatar mlubej commented on July 19, 2024

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.

sam99dave avatar sam99dave commented on July 19, 2024

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.

mlubej avatar mlubej commented on July 19, 2024

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.

sam99dave avatar sam99dave commented on July 19, 2024

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.

mlubej avatar mlubej commented on July 19, 2024

Assuming it worked. Let us know otherwise.

Closing.

from eo-learn.

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.