Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39657

BigPolygons $geoIntersects , areas greater than single hemisphere

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.0
    • Component/s: Geo
    • ALL
    • Query 2019-08-12

      Hi,
       
       
      "The custom MongoDB CRS uses a counter-clockwise winding order and allows $geoIntersects to support queries with a single-ringed GeoJSON polygon whose area is greater than or equal to a single hemisphere. If the specified polygon is smaller than a single hemisphere, the behavior of $geoIntersectswith the MongoDB CRS is the same as with the default CRS. See also “Big” Polygons."

      {
        <location field>: {
           $geoIntersects: {
              $geometry: {
                 type: "Polygon" ,
                 coordinates: [ <coordinates> ],
                 crs:

      {               type: "name",               properties: \{ name: "urn:x-mongodb:crs:strictwinding:EPSG:4326" }

                 }
              }
           }
        }
      }
       
      I want to make $geoIntersects queries for Geojson kept in database that intersects the Polygon. However, the the area can be greater than a single hemisphere or not. For that I have to use the crs property highlighted above.
       
      https://docs.mongodb.com/manual/reference/operator/query/geoIntersects/ says that "the behavior of $geoIntersectswith the MongoDB CRS is the same as with the default CRS", but if I keep the custom Crs property , and the area is smaller than a single hemisphere I get the intersections from the complementary area. So it seems not to keep the defautl crs behaviour for areas smaller than a single hemisphere.
       
       
       
      Can you help on this issue please?

        1. image (1).png
          image (1).png
          208 kB
        2. image.png
          image.png
          722 kB
        3. REGIONS.json
          1.71 MB

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            MongoDB2018PB PL [X]
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: