Reduce cyclomatic complexity in geospatial plugin

For some reason this just started failing on travis, not sure
how that's possible.