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

Add setting for sampling features to exclude from mapping #153

Open
miguelcleon opened this issue Aug 4, 2017 · 7 comments
Open

Add setting for sampling features to exclude from mapping #153

miguelcleon opened this issue Aug 4, 2017 · 7 comments

Comments

@miguelcleon
Copy link
Member

There is concern about loading a map with thousands of sampling features. This maybe too slow. To alleviate that we should add a MAP_CONFIG setting in the settings files to specify sampling feature types to exclude from the map.

@lsetiawan
Copy link
Member

  • I suggest trying this out for Map Clustering. https://github.com/SINTEF-9012/PruneCluster
  • After looking into things more, it seems like the problem is the backend query rather than the front end rendering. The front end can be faster, but the backend takes about 5s to output the api result due to on the spot database querying. After consulting my industry friends, they suggest that we use Redis to cache the first time request, to make it faster.
  • yes, we do need to implement a loading bar
  • as we start dealing with larger dataset, I think we need to start thinking of using a framework for our js code

@miguelcleon
Copy link
Member Author

@lsetiawan yes using Redis sounds like a good idea, I was thinking about that a while back but haven't implemented anything yet. Did you have a javascript framework in mind?

@lsetiawan
Copy link
Member

lsetiawan commented Aug 4, 2017

Yes. I was thinking of using React coupled with Redux. Since we really need a strong view component in the (MVC) to render our data. Plus it is an easier to learn framework compared to the others. What do you think?

@lsetiawan
Copy link
Member

@emiliom
Copy link
Member

emiliom commented Aug 4, 2017

yes, we do need to implement a loading bar

Just linking here to #150

To clarify, part of the issue is that maybe some sampling features should be excluded from the map (as @miguelcleon described when he opened the issue). It's not just about performance. There's map clutter as well, with potentially many specimen sampling features sharing the same lat-lon. But some specimens just don't make obvious sense to display on a map.

On the email exchange, it was pointed out that if the sampling feature doesn't have lat-lon coordinates, it won't be loaded into the map; I assume that also means only sampling features that have a point geometry are actually queried for, so that these sampling features really don't have any impact at all?

@lsetiawan
Copy link
Member

I assume that also means only sampling features that have a point geometry are actually queried for, so that these sampling features really don't have any impact at all?

@emiliom Not quite. Everything is queried then filtered (https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/views.py#L640). I guess now that I think about this. We should just query for sampling features that have featuregeometry instead.

@emiliom
Copy link
Member

emiliom commented Aug 4, 2017

I guess now that I think about this. We should just query for sampling features that have featuregeometry instead.

Or more specifically, FeatureGeometry is not null and SamplingFeatureGeoTypeCV == 'Point'. SamplingFeatures can store other geometries besides points (eg, polygons). In fact, I think I'll use that for CZIMEA at some point, to load CZO boundaries that define each CZO as a sampling feature.

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