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

geo coord reference system (CRS) spec and source code disagree

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.8
    • Affects Version/s: 2.7.6
    • Component/s: Geo
    • Labels:
    • Fully Compatible
    • ALL
    • Hide

      // Triangle around Shenzhen, China
      var shenzhenPoly = {}
      shenzhenPoly.type = 'Polygon',
      shenzhenPoly.coordinates = [
      [
      [ 114.0834046, 22.6648202 ],
      [ 113.8293457, 22.3819359 ],
      [ 114.2736054, 22.4047911 ],
      [ 114.0834046, 22.6648202 ]
      ]
      ];

      var CRS = {}
      CRS.type = 'name';
      CRS.properties = {}
      // no good but expected it to work:
      CRS.properties.name = 'urn:mongodb:crs:strictwinding:EPSG:4326';

      shenzhenPoly.crs = CRS;
      curs = coll.find({loc: {$geoWithin: {$geometry: shenzhenPoly}}});

      Show
      // Triangle around Shenzhen, China var shenzhenPoly = {} shenzhenPoly.type = 'Polygon', shenzhenPoly.coordinates = [ [ [ 114.0834046, 22.6648202 ], [ 113.8293457, 22.3819359 ], [ 114.2736054, 22.4047911 ], [ 114.0834046, 22.6648202 ] ] ]; var CRS = {} CRS.type = 'name'; CRS.properties = {} // no good but expected it to work: CRS.properties.name = 'urn:mongodb:crs:strictwinding:EPSG:4326'; shenzhenPoly.crs = CRS; curs = coll.find({loc: {$geoWithin: {$geometry: shenzhenPoly}}});

      I found mongod, geo search using big polygon feature CRS didn't accept the CRS I expected.

      I expected:
      "urn:mongodb:crs:strictwinding:EPSG:4326"
      ... where EPSG:4326 is the well-known legacy CRS identifier for WGS84 data.

      But only this value for CRS worked:
      'urn:mongodb:strictwindingcrs:EPSG:4326'

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            quentin.conner Quentin Conner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: