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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.7.6
    • Fix Version/s: 2.7.8
    • Component/s: Geo
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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}}});

      Description

      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'

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: