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

Made changes to appropriate java files to fix raster download methods… #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bhickson
Copy link
Contributor

…. Previously, the bounding box would be passed regardless of raster pixel alignment. When geoserver would recieve the WcsGetCoverage request where either the bounding box mins and maxs divided pixels OR if resx&resy were specified instead of width&height, it would cause a JAI warp operation which was transforming the produced raster to correspond to the bounding box. Changes made allow for the bounding box to be snapped to the nearest raster pixel edge instead so that a transformation will not take place. As well as shifting the raster, this was causing a particular issue with multi-band raster where 0 values in a pixels R,G,B values (i.e. 145,0,79) would be set to the whole pixel to "no-data" in transformation, resulting in pixel holes throughout the image.

E.g.:
Previous request....
bbox=464037.9751723,3477809.4781196,470646.2581182,3485398.5767305&crs=EPSG:26912&format=geotiff&resx=1.0&resy=1.0

New request...
bbox=464037.0,3477809.0,470646.0,3485398.0&crs=EPSG:26912&format=geotiff&width=6609&height=7589

bhickson and others added 5 commits September 9, 2015 09:24
Create setSortableLayers function into searchResultsTable and inserted function into attachEvents
Add layerId as id value for each rowContainer (e.g. 'id = "arizona_censusBlocks_2015" ' ).  Allows us to tie zIndex value to div position in previewedLayers when layer(s) are dragged around.
Change cursor on previewedLayers hover to let user know that layer position can be changed with drag and drop
…. Previously, the bounding box would be passed regardless of raster pixel alignment. This would cause the raster to be transformed to coincide with the bounding box. Changes made allow for the bounding box to be snapped to the nearest raster pixel edge so that a transformation will not take place. This was causing a particular issue with multi-band raster where 0 values in a pixels R,G,B values (i.e. 145,0,79) would be set to the whole pixel to "no-data" in transformation, resulting in pixel holes throughout the image.
"&crs=" + coverageOffering.getSupportedCRSs().get(0) +
"&format=" + outputFormat;

getCoverageRequest += generateSize(coverageOffering.getRectifiedGrid());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer need generateSize. The getCoverageRequest string is composed near the end of the file.

@chrissbarnett
Copy link
Contributor

Hi @bhickson , I merged your changes here into the branch https://github.com/OpenGeoportal/OGP2/tree/bhickson-wcsRequest_BBFix
Subsequently I made some fairly significant changes and refactored quite a bit, but I think I mostly kept your logic. I tested with a couple of your raster layers and with a couple from Politecnico di Milano that worked correctly. If you have a chance, can you either supply an example of a previously problematic request/layer or test that branch? Once that is done, I will merge it with master. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants