Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SI_LULC_pipeline notebook #491

Closed
mertensu opened this issue Oct 11, 2022 · 9 comments
Closed

SI_LULC_pipeline notebook #491

mertensu opened this issue Oct 11, 2022 · 9 comments

Comments

@mertensu
Copy link

Hi, I am new to geo-spatial data analysis and was going through your Land use and Land cover example.

Two things that are not clear to me:

  1. Where do you get the geojson file with the slovenian boundaries from? On the Natural Earth homepage, it seems one can only download a .shp file.

  2. How do you get the center patch ID (616)? And are you sure this is still correct? I run into: "Warning! Use a different central patch ID, this one is on the border."

Thanks in advance for your help!

@zigaLuksic
Copy link
Collaborator

  1. The description states that we took the shape from the Natural Earth (as a .shp), then loaded the shape, applied a 500m buffer and saved it. You can find it in the repo under example_data/svn_border.geojson
  2. In the cell where the selection is visualized you can also see which cell the corresponding ID belongs to. The ID 616 was chosen since the area contains all of the main landcover classes. I just re-rean the notebook and don't get an error, did you perhaps change something?

@zigaLuksic
Copy link
Collaborator

Also, feel free to report any oddities you find, we're always keen to improve the examples

@mertensu
Copy link
Author

Thanks for your quick reply! Ah, cool. I actually did not even come so far in the tutorial yet and hence did see the selection visualisation.

One more thing: If I apply the code to another country (e.g. Germany) what do I need to change? The selection visualisation displays all bboxes shifted to the right of the actual country borders. I guess it has to do with the crs?

Thanks again!

@zigaLuksic
Copy link
Collaborator

Sounds like you should double-check that the CRS match, yes

@mertensu
Copy link
Author

mertensu commented Oct 11, 2022

Actually the CRS matches. Did not change anything compared to the Slovenia example.

country = country.to_crs(epsg=32633).buffer(500)

Plotting the bbox_gdf looks weird...

image

country crs:

`Derived Projected CRS: EPSG:32633
Name: WGS 84 / UTM zone 33N
Axis Info [cartesian]:

  • E[east]: Easting (metre)
  • N[north]: Northing (metre)
    Area of Use:
  • name: Between 12°E and 18°E, northern hemisphere between equator and 84°N, onshore and offshore. Austria. Bosnia and Herzegovina. Cameroon. Central African Republic. Chad. Congo. Croatia. Czechia. Democratic Republic of the Congo (Zaire). Gabon. Germany. Hungary. Italy. Libya. Malta. Niger. Nigeria. Norway. Poland. San Marino. Slovakia. Slovenia. Svalbard. Sweden. Vatican City State.
  • bounds: (12.0, 0.0, 18.0, 84.0)
    Coordinate Operation:
  • name: UTM zone 33N
  • method: Transverse Mercator
    Datum: World Geodetic System 1984 ensemble
  • Ellipsoid: WGS 84
  • Prime Meridian: Greenwich`

Country plot looks good:

image

@zigaLuksic
Copy link
Collaborator

The notebook uses UtmZoneSplitter so for large countries you'll get the bboxes with different CRS (corresponding to the appropriate UTM zone, see here). The notebook assumes that all the BBoxes share the same CRS when the geodataframe is constructed.

@mertensu
Copy link
Author

Thanks! And is there an easy way to circumvent this problem of different CRS and still get the same result?

@zigaLuksic
Copy link
Collaborator

Working over multiple CRS brings a whole set of issues. However for this example I believe you should only have problems when displaying results (the bbox_gdf seems to only be used for plotting purposes).
Another angle is also that here we focus on only 9 EOPatches, partially to conserve data, and also because we the LGBM model for predictions we don't need to have an enormous amount of data. So you can just focus on a sub-area of Germany in order to run this notebook.

@zigaLuksic
Copy link
Collaborator

Assuming it was resolved due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants