evsatt / Final_GOOS_BioEco

0 stars 1 forks source link

add full geojson output with validated geometries #2

Open btupper opened 1 year ago

btupper commented 1 year ago

Hi Erin,

Thanks again for the walk through. I took the liberty of making a branch "valid-geometries" to see if I could generate a "final" output with valid geometries. It's a separate branch so it won't pollute your original main branch. I saved the output (see out2 variable) as geojson format. sf::read_sf reads it back in without issues.

You can see in the plot that there are still some pretty wild geometries - but happily they seem to be valid. I have an inkling that the way gdal (under the hood) handles invalid geometries has changed since you build the database - that which ran successfully back then now throws errors. It's probably a good thing in the long run, but will cause issues now for you.

I will now pass the output up the food chain, and let you know how it goes.

Thanks again! Ben

evsatt commented 1 year ago

Sounds great! thanks!

On Thu, Nov 17, 2022 at 9:03 AM Ben Tupper @.***> wrote:

Hi Erin,

Thanks again for the walk through. I took the liberty of making a branch "valid-geometries" to see if I could generate a "final" output with valid geometries. It's a separate branch so it won't pollute your original main branch. I saved the output (see out2 variable https://urldefense.com/v3/__https://github.com/BigelowLab/Final_GOOS_BioEco/blob/valid-geojson/Code_Satterthwaite2021/Mapping_Satterthwaite2021.R*L194__;Iw!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW7BWEysPQ$) as geojson format. sf::read_sf reads it back in without issues.

You can see in the plot https://urldefense.com/v3/__https://github.com/BigelowLab/Final_GOOS_BioEco/blob/valid-geojson/final-out_reprex.md__;!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW52-UIy1A$ that there are still some pretty wild geometries - but happily they seem to be valid. I have an inkling that the way gdal (under the hood) handles invalid geometries has changed since you build the database - that which ran successfully back then now throws errors. It's probably a good thing in the long run, but will cause issues now for you.

I will now pass the output up the food chain, and let you know how it goes.

Thanks again! Ben

You can view, comment on, or merge this pull request online at:

https://github.com/evsatt/Final_GOOS_BioEco/pull/2 https://urldefense.com/v3/__https://github.com/evsatt/Final_GOOS_BioEco/pull/2__;!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW7gGKouRg$ Commit Summary

File Changes

(6 files https://urldefense.com/v3/__https://github.com/evsatt/Final_GOOS_BioEco/pull/2/files__;!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW5tOnC_nA$ )

Patch Links:

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/evsatt/Final_GOOS_BioEco/pull/2__;!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW7gGKouRg$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AD356WJKR7Q3PIU5FYVRHA3WIZQMHANCNFSM6AAAAAASDTC6PQ__;!!Mih3wA!GH96BM8j0PPM4jZz0Z0x4VylvXlVX_I3aFjnCjq2LZsYK4-BJjfLJRoKtPtsc-48Pax3oqjspeIXEMeZcLlRnW6TRwhU-A$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--


Erin Satterthwaite | she/her
Marine Ecologist & Sustainability Researcher
CalCOFI Program Coordinator
UC San Diego - Scripps Institution of Oceanography
California Sea Grant & CalCOFI
9500 Gilman Dr., La Jolla, CA 92093-0232
*cell*: 805-895-4353

*Play is the highest form of research *
                                 *   ~Albert Einstein*