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

More show improvements #185

Merged
merged 11 commits into from
Jan 20, 2025
Merged

More show improvements #185

merged 11 commits into from
Jan 20, 2025

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Jan 20, 2025

Supersedes #177
Fix #176 #182

actual changes

  • forward 2-arg show(io, geom) to 3-arg show(io, MIME"text/plain"(), geom)
  • Wrap CRS in quotes when showing, so that geometries can be copy/pasted at least

bugfixes and tests

  • bugfix missing or wrongly named variables / typos when showing wrapper geometries
  • bugfix show
  • fix point show by adding a screen_ncols kwarg
  • use sprint() instead of global IOBuffers in testing, so that it can be made interactive
  • force display size to be consistent in the test function
  • Test the printing of wrapped (rapped ;)) geometries

@asinghvi17 asinghvi17 changed the base branch from bugfix_vars to main January 20, 2025 02:09
@asinghvi17
Copy link
Member Author

CI is finally green!!

@asinghvi17 asinghvi17 requested review from rafaqz and evetion January 20, 2025 02:16
@@ -80,7 +80,7 @@ test_display(pointm, "Point{false, true}((1, 2, 3))", "Point((1,2,3))")
pointm_crs = GI.Point((X=1, Y=2, M=3); crs=EPSG(4326))
@test parent(pointm_crs) === parent(pointm)
@test GI.crs(pointm_crs) === EPSG(4326)
test_display(pointm_crs, "Point{false, true}((1, 2, 3), crs = EPSG{1}((4326,)))", "Point((1,2,3))")
test_display(pointm_crs, "Point{false, true}((1, 2, 3), crs = \"EPSG:4326\")", "Point((1,2,3))")
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if showing EPSG as a string is confusing to users who still need to use the constructor

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, but it's equivalent in most cases that one might care about (Proj and GDAL)

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should change show on GFT types to show the constructor too?

@rafaqz rafaqz merged commit 37b07f6 into main Jan 20, 2025
6 of 7 checks passed
@rafaqz rafaqz deleted the as/moreshow branch January 20, 2025 14:02
This was referenced Jan 20, 2025
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.

show bug with LibGEOS.Polygon
2 participants