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

Can't extract geo keys error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 4.4.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Mongo version 4.4.1

      try to insert this document in a collection with a index 2dsphere in the field coordinates.bounding_polygon

      Show
      Mongo version 4.4.1 try to insert this document in a collection with a index 2dsphere in the field coordinates.bounding_polygon

      Description

      I'm trying to add this record to a collection with a index 2dsphere in the field coordinates.bounding_polygon:

      { _id: "553248635975750802", ancestors: [ \{ type: "province_state" }

      , { type: "province_state" }, { type: "country" }, { type: "continent" } ], associations: { point_of_interest: [ "6089485" ] }, coordinates: { center_point:

      { type: "Point", coordinates: [ -113.17927, 67.14037 ] }

      , bounding_polygon: { type: "Polygon", coordinates: [ [ [ 127.192506, 66.047911 ], [ -126.841607, 65.925156 ], [ -124.9152374267578, 65.91987032044477 ], [ -123.853326, 65.55643600000001 ], [ -102.139892578125, 65.55845978217837 ], [ -101.953125, 65.67638148211446 ], [ -101.881272, 65.80209499999999 ], [ -101.881272, 67.66619900000001 ], [ -102.232233, 67.747986 ], [ -104.956842, 67.891375 ], [ -108.82403, 68.01429899999999 ], [ -110.845514, 68.383011 ], [ -112.691217, 68.362539 ], [ -117.173639, 69.284336 ], [ -118.491998, 69.42772100000001 ], [ -121.831841, 69.407248 ], [ -122.182832, 69.325457 ], [ -122.007022, 68.362678 ], [ -122.270605, 68.07589299999999 ], [ -122.270643, 67.645715 ], [ -122.710748, 67.58411 ], [ -124.908013, 67.604585 ], [ -125.083105, 67.563776 ], [ -123.676893, 67.481837 ], [ -123.325678, 67.113114 ], [ -123.85302, 66.990206 ], [ -123.325982, 66.826398 ], [ -122.974419, 66.94930600000001 ], [ -122.271294, 66.94930600000001 ], [ -121.919732, 66.621551 ], [ -121.040826, 66.642036 ], [ -120.337701, 66.498645 ], [ -119.195123, 66.51912900000001 ], [ -118.316217, 66.68300600000001 ], [ -117.085748, 66.642036 ], [ -116.470514, 66.68300600000001 ], [ -116.118951, 66.62155300000001 ], [ -115.503717, 66.62155300000001 ], [ -115.41552, 66.560028 ], [ -115.591607, 66.518987 ], [ -116.118951, 66.559957 ], [ -116.734185, 66.478019 ], [ -116.909665, 66.43711999999999 ], [ -116.558098, 66.293727 ], [ -116.997857, 66.19123999999999 ], [ -117.700982, 66.232202 ], [ -118.228326, 66.35511 ], [ -118.75567, 66.25268699999999 ], [ -119.107232, 66.273172 ], [ -119.458795, 66.375596 ], [ -120.337701, 66.31414100000001 ], [ -120.513178, 66.273242 ], [ -119.810053, 66.150335 ], [ -119.897949, 65.945488 ], [ -120.337701, 65.88396400000001 ], [ -121.304498, 65.965903 ], [ -121.479981, 65.80209499999999 ], [ -121.12814, 65.679187 ], [ -121.304498, 65.63808299999999 ], [ -122.271294, 65.63808400000001 ], [ -122.710748, 65.74050699999999 ], [ -123.238091, 65.63808299999999 ], [ -123.853326, 65.658558 ], [ -124.293385, 65.86354900000001 ], [ -124.293084, 66.088881 ], [ -124.46856, 66.129779 ], [ -125.259576, 66.006801 ], [ -126.490044, 66.00679599999999 ], [ -127.017388, 66.17067299999999 ], [ -127.192506, 66.047911 ] ] ] } }, country_code: "CA", createdDate: new Date(1617983854867), descendants: { city: [ "3914", "181833", "3000470090" ] }, description: { en-US: "region" }, lastModifiedDate: new Date(1617983854867), name: { en-US: "Fort Smith Region" }, name_full: { en-US: "Fort Smith Region, Canada" }, type: "province_state" } Loop is not valid: [ [ -127.192506, 66.047911 ], [ -126.841607, 65.925156 ], [ -124.9152374267578, 65.91987032044477 ], [ -123.853326, 65.55643600000001 ], [ -102.139892578125, 65.55845978217837 ], [ -101.953125, 65.67638148211446 ], [ -101.881272, 65.80209499999999 ], [ -101.881272, 67.66619900000001 ], [ -102.232233, 67.747986 ], [ -104.956842, 67.891375 ], [ -108.82403, 68.01429899999999 ], [ -110.845514, 68.383011 ], [ -112.691217, 68.362539 ], [ -117.173639, 69.284336 ], [ -118.491998, 69.42772100000001 ], [ -121.831841, 69.407248 ], [ -122.182832, 69.325457 ], [ -122.007022, 68.362678 ], [ -122.270605, 68.07589299999999 ], [ -122.270643, 67.645715 ], [ -122.710748, 67.58411 ], [ -124.908013, 67.604585 ], [ -125.083105, 67.563776 ], [ -123.676893, 67.481837 ], [ -123.325678, 67.113114 ], [ -123.85302, 66.990206 ], [ -123.325982, 66.826398 ], [ -122.974419, 66.94930600000001 ], [ -122.271294, 66.94930600000001 ], [ -121.919732, 66.621551 ], [ -121.040826, 66.642036 ], [ -120.337701, 66.498645 ], [ -119.195123, 66.51912900000001 ], [ -118.316217, 66.68300600000001 ], [ -117.085748, 66.642036 ], [ -116.470514, 66.68300600000001 ], [ -116.118951, 66.62155300000001 ], [ -115.503717, 66.62155300000001 ], [ -115.41552, 66.560028 ], [ -115.591607, 66.518987 ], [ -116.118951, 66.559957 ], [ -116.734185, 66.478019 ], [ -116.909665, 66.43711999999999 ], [ -116.558098, 66.293727 ], [ -116.997857, 66.19123999999999 ], [ -117.700982, 66.232202 ], [ -118.228326, 66.35511 ], [ -118.75567, 66.25268699999999 ], [ -119.107232, 66.273172 ], [ -119.458795, 66.375596 ], [ -120.337701, 66.31414100000001 ], [ -120.513178, 66.273242 ], [ -119.810053, 66.150335 ], [ -119.897949, 65.945488 ], [ -120.337701, 65.88396400000001 ], [ -121.304498, 65.965903 ], [ -121.479981, 65.80209499999999 ], [ -121.12814, 65.679187 ], [ -121.304498, 65.63808299999999 ], [ -122.271294, 65.63808400000001 ], [ -122.710748, 65.74050699999999 ], [ -123.238091, 65.63808299999999 ], [ -123.853326, 65.658558 ], [ -124.293385, 65.86354900000001 ], [ -124.293084, 66.088881 ], [ -124.46856, 66.129779 ], [ -125.259576, 66.006801 ], [ -126.490044, 66.00679599999999 ], [ -127.017388, 66.17067299999999 ], [ -127.192506, 66.047911 ] ] Edges 3 and 56 cross. Edge locations in degrees: [-123.8533260, 65.5564360][-102.1398926, 65.5584598] and [-121.4799810, 65.8020950]-[-121.1281400, 65.6791870]; nested exception is com.mongodb.MongoWriteException: Can't extract geo keys: { _id: "553248635975750802", ancestors: [

      { type: "province_state" }

      , { type: "province_state" }, { type: "country" }, { type: "continent" } ], associations: { point_of_interest: [ "6089485" ] }, coordinates: { center_point:

      { type: "Point", coordinates: [ -113.17927, 67.14037 ] }

      , bounding_polygon: { type: "Polygon", coordinates: [ [ [ -127.192506, 66.047911 ], [ -126.841607, 65.925156 ], [ -124.9152374267578, 65.91987032044477 ], [ -123.853326, 65.55643600000001 ], [ -102.139892578125, 65.55845978217837 ], [ -101.953125, 65.67638148211446 ], [ -101.881272, 65.80209499999999 ], [ -101.881272, 67.66619900000001 ], [ -102.232233, 67.747986 ], [ -104.956842, 67.891375 ], [ -108.82403, 68.01429899999999 ], [ -110.845514, 68.383011 ], [ -112.691217, 68.362539 ], [ -117.173639, 69.284336 ], [ -118.491998, 69.42772100000001 ], [ -121.831841, 69.407248 ], [ -122.182832, 69.325457 ], [ -122.007022, 68.362678 ], [ -122.270605, 68.07589299999999 ], [ -122.270643, 67.645715 ], [ -122.710748, 67.58411 ], [ -124.908013, 67.604585 ], [ -125.083105, 67.563776 ], [ -123.676893, 67.481837 ], [ -123.325678, 67.113114 ], [ -123.85302, 66.990206 ], [ -123.325982, 66.826398 ], [ -122.974419, 66.94930600000001 ], [ -122.271294, 66.94930600000001 ], [ -121.919732, 66.621551 ], [ -121.040826, 66.642036 ], [ -120.337701, 66.498645 ], [ -119.195123, 66.51912900000001 ], [ -118.316217, 66.68300600000001 ], [ -117.085748, 66.642036 ], [ -116.470514, 66.68300600000001 ], [ -116.118951, 66.62155300000001 ], [ -115.503717, 66.62155300000001 ], [ -115.41552, 66.560028 ], [ -115.591607, 66.518987 ], [ -116.118951, 66.559957 ], [ -116.734185, 66.478019 ], [ -116.909665, 66.43711999999999 ], [ -116.558098, 66.293727 ], [ -116.997857, 66.19123999999999 ], [ -117.700982, 66.232202 ], [ -118.228326, 66.35511 ], [ -118.75567, 66.25268699999999 ], [ -119.107232, 66.273172 ], [ -119.458795, 66.375596 ], [ -120.337701, 66.31414100000001 ], [ -120.513178, 66.273242 ], [ -119.810053, 66.150335 ], [ -119.897949, 65.945488 ], [ -120.337701, 65.88396400000001 ], [ -121.304498, 65.965903 ], [ -121.479981, 65.80209499999999 ], [ -121.12814, 65.679187 ], [ -121.304498, 65.63808299999999 ], [ -122.271294, 65.63808400000001 ], [ -122.710748, 65.74050699999999 ], [ -123.238091, 65.63808299999999 ], [ -123.853326, 65.658558 ], [ -124.293385, 65.86354900000001 ], [ -124.293084, 66.088881 ], [ -124.46856, 66.129779 ], [ -125.259576, 66.006801 ], [ -126.490044, 66.00679599999999 ], [ -127.017388, 66.17067299999999 ], [ -127.192506, 66.047911 ] ] ] } }, country_code: "CA", createdDate: new Date(1617983854867), descendants: { city: [ "3914", "181833", "3000470090" ] }, description: { en-US: "region" }, lastModifiedDate: new Date(1617983854867), name: { en-US: "Fort Smith Region" }, name_full: { en-US: "Fort Smith Region, Canada" }, type: "province_state" }

      The message error displayed is:

      Can't extract geo keys error: .... Loop is not valid: [ [ -127.192506, 66.047911 ], [ -126.841607, 65.925156 ], [ -124.9152374267578, 65.91987032044477 ], [ -123.853326, 65.55643600000001 ], [ -102.139892578125, 65.55845978217837 ], [ -101.953125, 65.67638148211446 ], [ -101.881272, 65.80209499999999 ], [ -101.881272, 67.66619900000001 ], [ -102.232233, 67.747986 ], [ -104.956842, 67.891375 ], [ -108.82403, 68.01429899999999 ], [ -110.845514, 68.383011 ], [ -112.691217, 68.362539 ], [ -117.173639, 69.284336 ], [ -118.491998, 69.42772100000001 ], [ -121.831841, 69.407248 ], [ -122.182832, 69.325457 ], [ -122.007022, 68.362678 ], [ -122.270605, 68.07589299999999 ], [ -122.270643, 67.645715 ], [ -122.710748, 67.58411 ], [ -124.908013, 67.604585 ], [ -125.083105, 67.563776 ], [ -123.676893, 67.481837 ], [ -123.325678, 67.113114 ], [ -123.85302, 66.990206 ], [ -123.325982, 66.826398 ], [ -122.974419, 66.94930600000001 ], [ -122.271294, 66.94930600000001 ], [ -121.919732, 66.621551 ], [ -121.040826, 66.642036 ], [ -120.337701, 66.498645 ], [ -119.195123, 66.51912900000001 ], [ -118.316217, 66.68300600000001 ], [ -117.085748, 66.642036 ], [ -116.470514, 66.68300600000001 ], [ -116.118951, 66.62155300000001 ], [ -115.503717, 66.62155300000001 ], [ -115.41552, 66.560028 ], [ -115.591607, 66.518987 ], [ -116.118951, 66.559957 ], [ -116.734185, 66.478019 ], [ -116.909665, 66.43711999999999 ], [ -116.558098, 66.293727 ], [ -116.997857, 66.19123999999999 ], [ -117.700982, 66.232202 ], [ -118.228326, 66.35511 ], [ -118.75567, 66.25268699999999 ], [ -119.107232, 66.273172 ], [ -119.458795, 66.375596 ], [ -120.337701, 66.31414100000001 ], [ -120.513178, 66.273242 ], [ -119.810053, 66.150335 ], [ -119.897949, 65.945488 ], [ -120.337701, 65.88396400000001 ], [ -121.304498, 65.965903 ], [ -121.479981, 65.80209499999999 ], [ -121.12814, 65.679187 ], [ -121.304498, 65.63808299999999 ], [ -122.271294, 65.63808400000001 ], [ -122.710748, 65.74050699999999 ], [ -123.238091, 65.63808299999999 ], [ -123.853326, 65.658558 ], [ -124.293385, 65.86354900000001 ], [ -124.293084, 66.088881 ], [ -124.46856, 66.129779 ], [ -125.259576, 66.006801 ], [ -126.490044, 66.00679599999999 ], [ -127.017388, 66.17067299999999 ], [ -127.192506, 66.047911 ] ]

      I don't see any issue with this polygon:
      https://gist.github.com/pmribeiro/f714807f361a68f3609e24aa6c450d7b

        Attachments

          Activity

            People

            Assignee:
            edwin.zhou Edwin Zhou
            Reporter:
            ribeirinho77@gmail.com Pedro Ribeiro
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: