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

Mapping for Traits #98

Open
hkindsvater opened this issue Jun 4, 2020 · 10 comments
Open

Mapping for Traits #98

hkindsvater opened this issue Jun 4, 2020 · 10 comments

Comments

@hkindsvater
Copy link
Collaborator

In addition to Country of Occurrence, it would be great to create a map for each trait sample. Is is possible to build this from our existing Trend maps? Can we add a layer of shapefiles of tRFMO areas and a script that matches lat-long to each layer? @coffeejunk maybe you can tell us if this is a big or a small job.

@coffeejunk
Copy link
Member

The map element that I created for the trends detail page can be reused for Traits (or if required easily customized).
Adding additional shapefiles is pretty straight forward as would be lat/long matching of the layers.

@hkindsvater
Copy link
Collaborator Author

Great, thanks

@creeas
Copy link
Collaborator

creeas commented Jul 7, 2023

Hey @coffeejunk and @redrambles just checking to see on progress on the maps for the traits side, and the maps on the species landings pages. Do you need anything from me?

@coffeejunk
Copy link
Member

@creeas sorry for the delay here. The range maps on the species landing page are ready from the development point of view:

Screenshot 2023-07-09 at 11 06 43 AM

However, the Shapefile's resolution of its features is too high, and it takes a very long time to render the maps. The above screenshot took ~30 seconds; if I zoom into a random spot, it takes >2 minutes to render this:

Screenshot 2023-07-09 at 11 10 01 AM

I'm trying different approaches to reducing the resolution of the features and improving the rendering but so far, to no avail.

@creeas
Copy link
Collaborator

creeas commented Jul 9, 2023

Ah I see, and thanks for keeping up on this. Wow those look great, but I can see how that rendering time would make it unusable. Can the shapefiles be preprocessed to reduce their resolution before they are imported into the db? Let me know if there is anything you need on my end to get for you...

@creeas
Copy link
Collaborator

creeas commented Jul 9, 2023

It looks like there may be a way to reduce the resolution via reducing the nodes in the polygons. Since this is primarily for visualization purposes this might a a useful route. I will see if I can generate some test shapefiles for a handful of species and we can see how they render.

@coffeejunk
Copy link
Member

@creeas did you have a chance to look into this?

@creeas
Copy link
Collaborator

creeas commented Aug 30, 2023

Hey @coffeejunk sorry not yet. I've been busy teaching, but the last day is tomorrow. I will carve out some time in the next week to see about reducing the polygon resolution and speeding up the rendering.

@creeas
Copy link
Collaborator

creeas commented Feb 29, 2024

Hey @coffeejunk and @redrambles I'm really sorry I am just getting back to this after lots of sidetracks. I am working on simplifying the shapefiles to possibly speed up rendering. I also came across another solution on a dashboard. What about converting the shapefiles to .pngs on which we can overlay the points from the observations? With the reduced size it should make it much easier/faster to render as a layer this way. What do you think?

@coffeejunk
Copy link
Member

@creeas do you mean rendering PNGs and then just showing those on the page instead of an interactive map, or do you mean PNGs as a layer in the map? 🤔

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

No branches or pull requests

3 participants