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

Overlap between parts of a map #10

Open
IAFAssafB opened this issue Dec 23, 2019 · 1 comment
Open

Overlap between parts of a map #10

IAFAssafB opened this issue Dec 23, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@IAFAssafB
Copy link

Hi!
When taking a large map and dividing it to GRG's , I think it would be useful to have some overlap between the new GRGs. Sometime an important feature of the original map falls right in the stitch of two nearby maps and could get lost.
An overlap of a few dozen pixels/percents might resolve this.
Thanks!

@steven-omaha steven-omaha added the enhancement New feature or request label Dec 23, 2019
@steven-omaha
Copy link

Example:

  • !grg h_pages=2 now leads to ltrim=0.5 for one page, and rtrim=0.5 for the other one.
  • With the overlap, it would become ltrim=0.475 and rtrim=0.475.

To solve this we need to do the following

  1. Add a (for now constant) overlap_factor=0.05, lets the pages overlap by 5%.
  2. Adjust ltrim, rtrim, btrim, ttrim in the following manner (shown for horizontal divisions):
x_offset = 1 / args[arg.H_PAGES] * overlap_factor / 2  # overlap gets applied twice 
ltrim = h / args[arg.H_PAGES]  
if h > 0:
     ltrim -= x_offset
rtrim = (1 - (h+1) / args[arg.H_PAGES])
if h < args[arg.H_PAGES] -1:
    rtrim -= x_offset
  1. This offsets the grid horizontally. Correct this by passing an x_offset to TeX. This should be easy since the grid is put inside scope of the node which holds the image.
  2. Extend the existing grid in positive x-direction for all pages except the last one.
  3. Draw a new grid in negative x-direction for all pages except the first one.

For the last two steps we need new arguments for the main function in the TeX package.

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

No branches or pull requests

2 participants