geoNear does not return the closet point on a polygon (legacy coordinate format)

Hello community,

I am fairly new and I am trying to see if I can use MongoDB for a use case. I have 2D data, and I need to search for polygon that would intersect a given point.

I have created a collection called areas_2d. I have create a polygon that span from coast to coast in Canada.

		"name": "Coast to Coast",
		"location": [
			[-127, 49.880] 
			,[-127, 55]
			,[-65, 55] 
			,[-65, 49.880] 
			,[-127, 49.880]

The location field has a 2d spatial index.

When I use geoNear for the point [-97.1432372561, 49.88110396], I expect geoNear to return the closest point on the polygon. In that case it would be [-97.1432372561, 49.880]. That point being in the polygon, I expect the distance to be 0.

However, this is not what I see.

    { "$geoNear": {
        "near": [-97.1432372561, 49.88110396], 
        "key" : "location",
        "spherical": false,
        "distanceField": "distance",
		"includeLocs": "nearestPoint"


  _id: ObjectId('65c276d2c640945314769eb8'),
  name: 'Coast to Coast',
  location: [
  distance: 29.85676276430958,
  nearestPoint: [

It is not the closest point on the polygon. It is the closest corner. In addition, the distance returned is the distance between the query point and the closest corner point used to define the polygon.

I expected the function to return the closest point on the polygon, and a distance of 0 since the point is in the polygon. Is this the proper behavior? Is there a way to get the closest point on a polygon from an input point using 2d indexes?