Open miguelcleon opened 7 years ago
Redis
to cache the first time request, to make it faster.@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?
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?
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.
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.
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.