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 GI.convert for Makie plots, allow arrays #108

Merged
merged 5 commits into from
Aug 5, 2023
Merged

Use GI.convert for Makie plots, allow arrays #108

merged 5 commits into from
Aug 5, 2023

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Aug 4, 2023

@asinghvi17 I took the liberty of making a PR from your branch, I have this array code somewhere too but we may as well merge this instead. Float64 is also better for high resolution things, going on the FLoat32 artifacts we see at high zooms in Tyler.jl....

A test of plotting the vectors could help I guess done

@rafaqz rafaqz changed the title use Float64 instead of Float32 in point conversions; allow arrays of … use Float64 instead of Float32 in point conversions; allow arrays Aug 4, 2023
@rafaqz
Copy link
Member Author

rafaqz commented Aug 4, 2023

@jw3126 I swapped this over to just using GeoInterface.convert(GeometryBasics, geom) and removing all the logic here, let me know if this makes sense or has broken anything.

Arrays of geometries are working fine now (except where they don't work with GeometryBasics either) but the plot type detection isn't working - an array of polygons is plotted as a scatter with plot. Any ideas about how to fix that @asinghvi17 ?

Also @asinghvi17 that removes all your Float64 conversion, and leaves it up to whatever we do by default in GeometryBasics/GeoInterface.convert. It should just keep whatever the floating point type was (?).

@rafaqz rafaqz changed the title use Float64 instead of Float32 in point conversions; allow arrays Use GI.convert for Makie plots, allow arrays Aug 4, 2023
@jw3126
Copy link
Member

jw3126 commented Aug 4, 2023

@jw3126 I swapped this over to just using GeoInterface.convert(GeometryBasics, geom) and removing all the logic here, let me know if this makes sense or has broken anything.

I saw you skipped some tests, were these broken before, or does this PR break them?

@rafaqz
Copy link
Member Author

rafaqz commented Aug 4, 2023

I removed points as its not used anymore, so I also removed the tests... but wasn't sure if anyone was using it manually for anything?

You could instead use GI.convert.(Ref(GeometryBasics), GI.getpoint(geom))

Copy link
Member

@jw3126 jw3126 left a comment

Choose a reason for hiding this comment

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

Ok cool LGTM thanks!

@rafaqz rafaqz merged commit a724d71 into main Aug 5, 2023
10 checks passed
@rafaqz rafaqz deleted the as/float64 branch August 5, 2023 13:42
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.

3 participants