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

We need a section in InaSAFE docs explaining how clipping works #229

Open
timlinux opened this issue Oct 24, 2014 · 3 comments
Open

We need a section in InaSAFE docs explaining how clipping works #229

timlinux opened this issue Oct 24, 2014 · 3 comments

Comments

@timlinux
Copy link
Contributor

We are busy working to implement logic like this:

clpextentsadjustment - new page

The following logic will be used:

  • The clip extent of the northern edge will be decremented until it aligns with a pixel boundary of the target layer. If the target layer's northern edge is interior to the extents, the northern edge will be incremented until it aligns with a pixel boundary.
  • The clip extent of the southern edge will be incremented until it aligns with a pixel boundary of the target layer. If the target layer's southern edge is interior to the extents, the southern edge will be decremented until it aligns with a pixel boundary.
  • The clip extent of the eastern edge will be decremented until it aligns with a pixel boundary of the target layer. If the target layer's eastern edge is interior to the extents, the eastern edge will be incremented until it aligns with a pixel boundary.
  • The clip extent of the western edge will be incremented until it aligns with a pixel boundary of the target layer. If the target layer's western edge is interior to the extents, the western edge will be decremented until it aligns with a pixel boundary.
    You can clone / edit the above document here:
    https://www.lucidchart.com/documents/edit/379424d4-8c44-4ece-88cc-8792a7e8274b/0

There are various other pieces of logic relating to clipping and alignment that should be documented so that users can understand what happens under the hood.

@akbargumbira and @assefay Should provide their inputs on this too.

@akbargumbira
Copy link
Member

@timlinux this is great. Perhaps we should also explain from the very first:

  • How we get the optimal extent from input layers and the viewport
  • How we adjust that optimal extent to align with one of the input layer (either hazard/exposure)
  • That we can also allow InaSAFE not to resample exposure layer (if it's raster and the hazard has higher resolution - as it will resample both to the highest resolution)
  • How we do the clipping/resampling based on the adjusted extent

@timlinux
Copy link
Contributor Author

Yes and

@timlinux
Copy link
Contributor Author

timlinux commented Dec 5, 2014

See also #185

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

No branches or pull requests

3 participants