ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

Add setting for sampling features to exclude from mapping #153

Open miguelcleon opened 7 years ago

miguelcleon commented 7 years ago

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 commented 7 years ago
miguelcleon commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

Resource for setting up REDIS

emiliom commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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.