[SERVER-15288] geo coord reference system (CRS) spec and source code disagree Created: 17/Sep/14  Updated: 11/Jul/16  Resolved: 20/Oct/14

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.7.6
Fix Version/s: 2.7.8

Type: Bug Priority: Minor - P4
Reporter: Quentin Conner Assignee: Siyuan Zhou
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

// 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}}});

Participants:

 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'



 Comments   
Comment by Githook User [ 20/Oct/14 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: SERVER-15288 geo coord reference system (CRS) spec and source code disagree
Branch: master
https://github.com/mongodb/mongo/commit/2722078c4092c311ca4d6387be37543c8a662c99

Comment by Quentin Conner [ 17/Sep/14 ]

// this form works
CRS.properties.name = 'urn:mongodb:strictwindingcrs:EPSG:4326';
shenzhenPoly.crs = CRS;
curs = coll.find({loc: {$geoWithin: {$geometry: shenzhenPoly}}});

Generated at Thu Feb 08 03:37:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.