TUW-GEO / Equi7Grid

Definition of the Equi7Grid - a spatial reference optimized for global high-resolution raster data.
MIT License
61 stars 13 forks source link

border break seems it's causing a weird pattern in the tile system #43

Open csaybar opened 4 months ago

csaybar commented 4 months ago

Hi @bbauerma,

Thank you for the amazing work on Equi7Grid.

We have been using Equi7Grid for a while and recently noticed a potential bug in the Antarctica zone. It seems there is a border break that is affecting grid generation in tiles T1, T2, and T3. This issue introduces unusual patterns, particularly in T1. Please see the attached image for reference.

image

bbauerma commented 4 months ago

Dear @csaybar ,

thanks for your nice feedback, and reporting this issue.

Triggered by the recent inclusion of Equi7 in the EPSG database, we are anyway about to update the zones and tiles.

As we're collecting user needs: Do you have any requirements towards tile sizes and metadata?

csaybar commented 4 months ago

Hi @bbauerma,

I believe Equi7Grid has great potential for creating and storing EO databases globally. This is because the T1, ... Tn grids are self-contained and are naturally N-ary Trees!

The most difficult part for me was understanding the API. Initially, I started implementing many things that had already been implemented. I only realized this when I saw this file in the test file (later, I saw that it is recommended in the README; my bad).

For a new user after running:

equi7grid.Equi7Grid(10)

They might think that 10 refers to the grid size when it refers to the pixel size. Implementing a __repr__ for Equi7Grid could help new users a lot. I'm thinking of something similar to xarray.Dataset.

<xarray.Dataset> Size: 360B
Dimensions:        (time: 3, latitude: 4, longitude: 2)
Coordinates:
  * time           (time) datetime64[ns] 24B 2023-01-01 2023-01-02 2023-01-03
  * latitude       (latitude) int64 32B 10 20 30 40
  * longitude      (longitude) int64 16B 100 110
Data variables:
    temperature    (time, latitude, longitude) float64 192B 0.4327 ... 0.2689
    precipitation  (time, latitude) float64 96B 0.3684 0.8786 ... 0.2436 0.9572

Another interesting feature could be having an Equi7Grid method to create a local grid system. We've been working a bit on this. Additionally, adding type annotations can make the code easier to read and understand. Is this something that might interest you? I'd be happy to assist with it. Equi7Grid is a great idea that deserves more attention from the EO community!

image

@jfloresf17

bbauerma commented 4 months ago

@csaybar indeed, the testfile shows how to use many parts of the API, but this code location is not intuitive, and will be changed.

Your nested tiling scheme looks very useful, thanks for the example!

Soon, we'll have our internal planning on the corner points of the new package structure, and then methods like yours could be a good tool for user defined applications. We would be happy if you can contribute then. I'll keep you posted.

csaybar commented 4 months ago

Thank you,

@bbauerma We put all our code in a Python package equi7grid_lite. https://colab.research.google.com/drive/1SBjl4GVgCFUpVch2Prju5oiXN8WyzZTi?usp=sharing

Yes, for sure, I will be honored to collaborate :hand:

bbauerma commented 4 months ago

@csaybar please checkout the discussions

Feel free to add wishes as comments to https://github.com/TUW-GEO/Equi7Grid/discussions/45

csaybar commented 4 months ago

Hi @bbauerma, I just noticed that the zones in this repo are a bit different from the GML files in the EPSG repo :sweat_smile: https://epsg.org/extent_4746/Antarctica-Equi7.html

Is there a place where I can find them in the Equi7Grid projection? Have you changed the origin of zones in this new release?

Thanks!! :raised_hands: