home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 841012076 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 5

  • snowman2 6
  • keewis 3
  • MaxDragonheart 2
  • hamiddashti 1
  • max-sixty 1

author_association 3

  • CONTRIBUTOR 6
  • MEMBER 4
  • NONE 3

issue 1

  • Losing data when add a raster to a dataset · 13 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
832793635 https://github.com/pydata/xarray/issues/5075#issuecomment-832793635 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgzMjc5MzYzNQ== hamiddashti 5567953 2021-05-05T15:40:30Z 2021-05-05T15:40:30Z NONE

A "close enough" option can take care of issues such as in xarray.where in situations where the coordinates are very close but not exactly matched (here) (e.g. due to Geotif roudning, here ) .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
832696002 https://github.com/pydata/xarray/issues/5075#issuecomment-832696002 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgzMjY5NjAwMg== snowman2 8699967 2021-05-05T13:40:07Z 2021-05-05T13:40:07Z CONTRIBUTOR

Yes, the alignment stuff in there should do the trick.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
832689807 https://github.com/pydata/xarray/issues/5075#issuecomment-832689807 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgzMjY4OTgwNw== keewis 14808389 2021-05-05T13:31:52Z 2021-05-05T13:31:52Z MEMBER

if I understand the issue correctly this will be fixed by the index refactor (see https://github.com/pydata/xarray/pull/4489#issuecomment-831809607)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
832685060 https://github.com/pydata/xarray/issues/5075#issuecomment-832685060 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgzMjY4NTA2MA== snowman2 8699967 2021-05-05T13:25:23Z 2021-05-05T13:25:23Z CONTRIBUTOR

I think it would be nice for xarray to have a "close enough" option where a certain number of decimal places is enough to consider them equal. Is there an issue somewhere where this is under consideration or is there an option already in existence that I missed?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
832684387 https://github.com/pydata/xarray/issues/5075#issuecomment-832684387 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgzMjY4NDM4Nw== snowman2 8699967 2021-05-05T13:24:34Z 2021-05-05T13:24:34Z CONTRIBUTOR

Also related: https://github.com/corteva/rioxarray/discussions/332

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
820578700 https://github.com/pydata/xarray/issues/5075#issuecomment-820578700 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgyMDU3ODcwMA== snowman2 8699967 2021-04-15T16:49:34Z 2021-04-15T16:49:34Z CONTRIBUTOR

Similarly at https://github.com/corteva/rioxarray/issues/298#issuecomment-820557568

python np.abs(resampled.x.values - da2.x.values).max(), np.abs(resampled.y.values - da2.y.values).max() (4.000014541816199e-09, 6.666663665555461e-09)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
820575552 https://github.com/pydata/xarray/issues/5075#issuecomment-820575552 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgyMDU3NTU1Mg== snowman2 8699967 2021-04-15T16:46:15Z 2021-04-15T16:48:51Z CONTRIBUTOR

For the original post for this issue ref: np.abs(raster_in.x.values - out_grid.x.values).max(), np.abs(raster_in.y.values - out_grid.y.values).max() (1.7763568394002505e-15, 7.105427357601002e-15)

Looks like there is a tiny difference in decimal precision.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
820560634 https://github.com/pydata/xarray/issues/5075#issuecomment-820560634 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgyMDU2MDYzNA== snowman2 8699967 2021-04-15T16:23:28Z 2021-04-15T16:23:28Z CONTRIBUTOR

Similar issue here: https://github.com/corteva/rioxarray/issues/298

Reproducible example in the issue ^^

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
808754517 https://github.com/pydata/xarray/issues/5075#issuecomment-808754517 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgwODc1NDUxNw== keewis 14808389 2021-03-27T16:04:14Z 2021-03-27T16:04:14Z MEMBER

could you also show raster_in by itself so we can fully reproduce? I was thinking that there were tiny differences in x and y, but python a = xr.open_dataset("out_grid_process_value.nc") b = xr.open_dataset("rasterized_vector.nc") xr.testing.assert_equal(a[["id"]], b) shows that the coordinates are equal so that's not the issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
808747264 https://github.com/pydata/xarray/issues/5075#issuecomment-808747264 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgwODc0NzI2NA== MaxDragonheart 18444902 2021-03-27T15:10:59Z 2021-03-27T15:10:59Z NONE

Below my code ``` import geopandas import rioxarray from geocube.api.core import make_geocube

Read input_vector and create a GeoDataFrame

vector_in = geopandas.read_file(input_vector)

Read raster data

raster_in = rioxarray.open_rasterio(input_raster)

Create GeoCube

out_grid = make_geocube( vector_data=vector_in, measurements=["id"], like=raster_in, ) out_grid.to_netcdf("rasterized_vector.nc")

Add raster_in to geocube

out_grid["process_value"] = raster_in out_grid.to_netcdf("out_grid_process_value.nc") ``` Here there are two netCDF with output data.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
808146577 https://github.com/pydata/xarray/issues/5075#issuecomment-808146577 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgwODE0NjU3Nw== keewis 14808389 2021-03-26T11:37:55Z 2021-03-26T16:00:40Z MEMBER

the issue is that the code example you gave both there and here does not directly use xarray so debugging is difficult. Could you post the repr of raster_in and out_grid? If you can, saving both raster_in and out_grid to netCDF and attaching them to a comment might also help.

Without looking at the data I can't confirm, but I suspect this is a alignment issue. If so, we do have a open PR (not merged, yet, unfortunately) which added a tolerance kwarg to align and could fix this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
808023327 https://github.com/pydata/xarray/issues/5075#issuecomment-808023327 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgwODAyMzMyNw== MaxDragonheart 18444902 2021-03-26T08:08:10Z 2021-03-26T08:08:10Z NONE

All do you need is on the first linked issue, so here. You can find QGIS project with data example.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076
807595841 https://github.com/pydata/xarray/issues/5075#issuecomment-807595841 https://api.github.com/repos/pydata/xarray/issues/5075 MDEyOklzc3VlQ29tbWVudDgwNzU5NTg0MQ== max-sixty 5635139 2021-03-25T22:11:59Z 2021-03-25T22:11:59Z MEMBER

Please could you create a minimally reproducible example, as per the issue template?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Losing data when add a raster to a dataset 841012076

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 2946.856ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows