Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8132837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:26:16+00:00 2026-06-06T09:26:16+00:00

I have documents similar to this in RavenDB: public class MyClass { … public

  • 0

I have documents similar to this in RavenDB:

public class MyClass
{
    ...
    public double Latitude { get; set; }
    public double Longitude { get; set; }
    ...
}

Now I want to find all documents with positions within the bounds of a rectangle specified by its N and S latitude and W and E longitude.

A simple approach would be a query like this:

.Where(o => o.Latitude <= boundaryNorth &&
            o.Latitude >= boundarySouth &&
            o.Longitude >= boundaryWest &&
            o.Longitude <= boundaryEast)

But that doesn’t work if the bounding rectangle lies across the antimeridian, complicating the query (check if this is the case, split up the bounding rectangle into two, create two of the previous expressions combined by ||).

I know that you can create a spatial index and then query it for all documents with positions within a specified radius from a given origin, but I haven’t found any other methods of querying that index.

Is there any other way to query spatial indexes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:26:17+00:00Added an answer on June 6, 2026 at 9:26 am

    Currently we only allow to search for items within a specific distance of a point.
    We do have other capabilities, but they aren’t expose at the present time.
    I suggest taking this to the mailing list and seeing if we can provide you with the API you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have many documents similar to this... { name: 'alex', city: 'LA',
I have a class with various public properties which I allow users to edit
I have something that looks like the following document structure: public class Document {
The question I have is that of securing documents across services using RavenDb and
I am using SOLRNET and am using SOLR's MoreLikeThis functionality to get similar documents
I have a large ArrayList of objects similar to the following class Entry {
I have a set of documents in CouchDB that are geolocalized - that is,
I have a HTML/XML document similar to the following. There can be one or
I have an XML document with a section similar to the following: <release_list> <release>
I have documents that represent a folder structure. A folder can contain other folders

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.