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

Geotiff Writer does not use the right number of pixels #360

Closed
jdenisgiguere opened this issue Sep 20, 2019 · 1 comment · Fixed by #362
Closed

Geotiff Writer does not use the right number of pixels #360

jdenisgiguere opened this issue Sep 20, 2019 · 1 comment · Fixed by #362
Assignees
Labels
bug When it really isn't a "feature".

Comments

@jdenisgiguere
Copy link
Contributor

Expected situation

When I save a tile from a RasterFrameLayer as GeoTiff, I would expect that the size of the pixel would be the same for the output GeoTiff than the RasterFRameLayer.

Current situation

When I use a filter condition to keep only a tile from a RasterFrameLayer and I write it as GeoTiff, the resulting GeoTiff has the number of pixels than the original image instead of the number of pixels of the tile.

How to reproduce

See: https://gist.github.com/jdenisgiguere/980ca9f28d5ded5da0d30c39fea17e2f based on code provided by @metasim on gitter.im.

@metasim metasim self-assigned this Sep 21, 2019
@metasim metasim added the bug When it really isn't a "feature". label Sep 21, 2019
@metasim
Copy link
Member

metasim commented Sep 21, 2019

Here's where the actual pixel size is computed:

https://github.com/locationtech/geotrellis/blob/990f146da8217450fe037daeb058bbdbb4a9075c/raster/src/main/scala/geotrellis/raster/io/geotiff/tags/TiffTags.scala#L115-L116

So the bug is likely to do with the extent being used.

metasim added a commit to s22s/rasterframes that referenced this issue Sep 21, 2019
metasim added a commit to s22s/rasterframes that referenced this issue Sep 28, 2019
* fix/366:
  Added abiltiy to pass a crs specification string to `rf_crs`.
  Reworked TestEnvironment to make it easier to override SparkContext settings.
  Add rf_mask unit test in python, import geomesa types with module import
  Bumped development version.
  0.8.2 release prep.
  Updated release notes.
  IT regression fixes.
  Fixed handling of aggregate extent and image size on geotiff write.
  Unit test reproducing locationtech#360.
  Pass kwargs in python create_rf_spark_session to spark conf
  Tweaks to RasterSource-related code for easier extendability.
  Doc fixes missing @ref: prefixes.
  Doc fixes missing @ref: prefixes.
  Zonal stats page and other refactoring (locationtech#342)
  Bumped Spark version to 2.3.4
  Added rasterio and decartes.
  Display-oriented tweaks to docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When it really isn't a "feature".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants