mrc-ide / covid-sim

This is the COVID-19 CovidSim microsimulation model developed by the MRC Centre for Global Infectious Disease Analysis hosted at Imperial College, London.
GNU General Public License v3.0
1.23k stars 256 forks source link

Practicality of using a third party geographical library #220

Closed zebmason closed 4 years ago

zebmason commented 4 years ago

Obviously this may be a complete distraction. I'm raising this because I don't have a GIS background and hope that someone reading this does.

Currently the code uses 2D points of types int, float and double which it transforms between. For the float type it calculates distances between points in an appropriate co-ordinate system. Axis aligned bounding boxes are used for double and int, the latter in the bitmap calculations.

The non-functional requirements would appear to be low overhead in both memory and processing.

Is there a maintained third party library that could replace the current geographic functionality? e.g. Boost, GeographicLib may be possibilities if you'll forgive the solutioneering.

I've already done a rough refactoring of the current code, #213, on the basis that this will ultimately be replaced by third party code. If not I'll refine the code.

matt-gretton-dann commented 4 years ago

The requirements I have (and these apply in general):

These are to ensure that development of model features is not slowed down by re-engineering going on at the same time. I acknowledge that the above may be non-optimal, but the model is in active development and use, and so I'm being conservative about significant changes.

I'm happy to take suggestions based on the above as I am not familiar with the various libraries.

Feynstein commented 4 years ago

@zebmason I think thats where PCL could be of very good use, considering what you just said about points...: https://pointcloudlibrary.github.io/

zebmason commented 4 years ago

It would seem that a proper geometry library is all that is needed.