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

Use shapely.Polygon.svg() to draw stuff #21

Closed
Ezian opened this issue Jun 21, 2022 · 0 comments · Fixed by #22
Closed

Use shapely.Polygon.svg() to draw stuff #21

Ezian opened this issue Jun 21, 2022 · 0 comments · Fixed by #22
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@Ezian
Copy link
Owner

Ezian commented Jun 21, 2022

Context

shapely.Polygon.svg() allow to draw polygon in SVG.

Instead of using template, we should rely on this method, because it will fix issue with zone with hole.

TODO and To take care of

  • Replace render method with version that take advantage of svg() method
  • be careful to make it compatible with css stuff (require to modify the dom, adding classes and removing stuff we don't want)
  • Test with zone with hole (for instance a circular zone 0206 0207 0307 0406 0305 0205 should not cover hex 0306)

Example of return from svg() method

<path fill-rule="evenodd" fill="#66cc99" stroke="#555555" stroke-width="2.0" opacity="0.6"
    d="M 90.0,259.8076211353316 L 120.0,207.84609690826528 L 100.0,173.20508075688775 L 50.0,259.8076211353316 L 90.0,259.8076211353316 z" />
@Ezian Ezian added bug Something isn't working enhancement New feature or request labels Jun 21, 2022
@Ezian Ezian added this to the v1.2.1 milestone Jun 21, 2022
@Ezian Ezian self-assigned this Jun 27, 2022
Ezian pushed a commit that referenced this issue Jun 27, 2022
Ezian pushed a commit that referenced this issue Jun 28, 2022
Ezian pushed a commit that referenced this issue Jun 28, 2022
Ezian pushed a commit that referenced this issue Jun 29, 2022
Ezian pushed a commit that referenced this issue Jun 29, 2022
Ezian pushed a commit that referenced this issue Jun 29, 2022
Ezian pushed a commit that referenced this issue Jul 5, 2022
@Ezian Ezian closed this as completed in #22 Jul 5, 2022
Ezian added a commit that referenced this issue Jul 5, 2022
* Use `shapely.Polygon.svg()` to draw stuff
Fixes #21

Co-authored-by: Guillaume Fouillet <guillaume.fouillet+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant