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

What's the difference between "geo", "geo1", and "geo2"? #14718

Open
jievince opened this issue Aug 31, 2021 · 0 comments
Open

What's the difference between "geo", "geo1", and "geo2"? #14718

jievince opened this issue Aug 31, 2021 · 0 comments

Comments

@jievince
Copy link

I'm reading the source code of geo spatial.

class RocksDBGeoIndex final : public RocksDBIndex, public geo_index::Index {
  friend class RocksDBSphericalIndexIterator;

 public:
  RocksDBGeoIndex() = delete;

  RocksDBGeoIndex(IndexId iid, arangodb::LogicalCollection& collection,
                  arangodb::velocypack::Slice const& info, std::string const& typeName);

  ~RocksDBGeoIndex() = default;

  IndexType type() const override {
    if ("geo1" == _typeName) {
      return TRI_IDX_TYPE_GEO1_INDEX;
    } else if ("geo2" == _typeName) {
      return TRI_IDX_TYPE_GEO2_INDEX;
    }
    return TRI_IDX_TYPE_GEO_INDEX;
  }

  bool pointsOnly() const { return (_typeName != "geo"); }
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

1 participant