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

Printing a annotation (Polygon) with modified vertices throws an exception #9319

Closed
3 tasks done
dsuren1 opened this issue Aug 2, 2023 · 3 comments · Fixed by #9444
Closed
3 tasks done

Printing a annotation (Polygon) with modified vertices throws an exception #9319

dsuren1 opened this issue Aug 2, 2023 · 3 comments · Fixed by #9444

Comments

@dsuren1
Copy link
Contributor

dsuren1 commented Aug 2, 2023

Description

When printing a polygon annotation which vertices modified either by deleting or changing the vertices position, an incomplete polygon geometry is formed. Trying to print an annotation containing this malformed geometry results in the following exception

Error on printing: Error while generating PDF: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring

Acceptance criteria

  • Polygon annotation should be printable when vertices are modified (delete or moving position)
  • Import annotation with malformed annotation that previously exported should be printable (For backward compatibility)

How to reproduce

  • Create an annotation with polygon geometry
  • Save the annotation
  • Modify the annotation's polygon geometry by moving the positions of the coordinates or by deleting a coordinate (possible
    when > 3)
  • Save the geometry and annotation
  • Try printing the annotation to observe the error

Expected Result
Should be able to print annotation with all types of geometries

Actual Result
annotations_bug

  • Not browser related

Other useful information

Ref:
georchestra/mapstore2-georchestra#617
#7780

@tdipisa
Copy link
Member

tdipisa commented Aug 2, 2023

@dsuren1 thank you
I would like to review this issue with @allyoucanmap on the light of what he is doing for #9094

@tdipisa
Copy link
Member

tdipisa commented Aug 2, 2023

@dsuren1 after talking with @allyoucanmap I can confirm that it is better to wait for #9094 (including review and tests) before starting the development of this issue since #9094 introduces consistent refactor for the annotation tool.

@tdipisa
Copy link
Member

tdipisa commented Aug 30, 2023

@dsuren1 the work in progress for #9094 will be part of 2024.01 (the plan is changed for this). The stable branch for 2023.02.xx has already been created, therefore you can contribute the fix for this issue directly there.

dsuren1 added a commit to dsuren1/MapStore2 that referenced this issue Sep 14, 2023
@ElenaGallo ElenaGallo added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 20, 2023
@tdipisa tdipisa closed this as completed Sep 22, 2023
@ElenaGallo ElenaGallo self-assigned this Sep 22, 2023
@ElenaGallo ElenaGallo added Accepted and removed BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment