-
Notifications
You must be signed in to change notification settings - Fork 18
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
Forman 222 rasterize features into dataset #227
Conversation
…n' and 'lat' coords
addressing #222 with new function rasterize_features_into_dataset()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wäre dann vielleicht nett, die lats and longs in den Testmethodennamen auch umzubenennen. Vielleicht jetzt aber nicht so wichtig.
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
==========================================
+ Coverage 86.12% 86.16% +0.04%
==========================================
Files 78 78
Lines 7453 7634 +181
==========================================
+ Hits 6419 6578 +159
- Misses 1034 1056 +22
Continue to review full report at Codecov.
|
Sag wo, ich mach das. |
@@ -107,11 +107,11 @@ def test_get_dataset_indexes_without_bounds(self): | |||
self._assert_get_dataset_indexes_works(dataset) | |||
|
|||
def test_get_dataset_indexes_with_bounds_inverse_lat(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_get_dataset_indexes_with_bounds_inverse_lat(self): | |
def test_get_dataset_indexes_with_bounds_inverse_y(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lat
is fine here, because get_dataset_indexes
is still aware of lat
, not y
.
@@ -107,11 +107,11 @@ def test_get_dataset_indexes_without_bounds(self): | |||
self._assert_get_dataset_indexes_works(dataset) | |||
|
|||
def test_get_dataset_indexes_with_bounds_inverse_lat(self): | |||
dataset = new_cube(width=360, height=180, inverse_lat=True, drop_bounds=False) | |||
dataset = new_cube(width=360, height=180, inverse_y=True, drop_bounds=False) | |||
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) | |
self._assert_get_dataset_indexes_works(dataset, inverse_y=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) | ||
|
||
def test_get_dataset_indexes_without_bounds_inverse_lat(self): | ||
dataset = new_cube(width=360, height=180, inverse_lat=True, drop_bounds=True) | ||
dataset = new_cube(width=360, height=180, inverse_y=True, drop_bounds=True) | ||
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) | ||
|
||
def _assert_get_dataset_indexes_works(self, dataset, inverse_lat=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def _assert_get_dataset_indexes_works(self, dataset, inverse_lat=False): | |
def _assert_get_dataset_indexes_works(self, dataset, inverse_y=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here...
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) | ||
|
||
def test_get_dataset_indexes_without_bounds_inverse_lat(self): | ||
dataset = new_cube(width=360, height=180, inverse_lat=True, drop_bounds=True) | ||
dataset = new_cube(width=360, height=180, inverse_y=True, drop_bounds=True) | ||
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._assert_get_dataset_indexes_works(dataset, inverse_lat=True) | |
self._assert_get_dataset_indexes_works(dataset, inverse_y=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See in comments.
xcube.core.geom.rasterize_features_into_dataset()
xcube.core.new
,xcube.core.geom
,xcube.core.schema
,xcube.core.verify
no longer depending on WGS84 CRS (lon/lat coordinates)