[CSHARP-2464] There is no way to specify the CRS using the Mongo C# driver Created: 26/Dec/18 Updated: 08/Jan/19 Resolved: 08/Jan/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Read Operations |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ian Hannah | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
I am using the Within query and I need to specify the CRS so that it works for "big polygons" so I have tired this: }, "coordinates" : [[[-34.353119999999997, -50.140853], [-34.353119999999997, 76.184997999999993], [146.24300500000001, 76.184997999999993], [146.24300500000001, -50.140853], [-34.353119999999997, -50.140853]]] } } } } |
| Comments |
| Comment by Kelsey Schubert [ 08/Jan/19 ] |
|
Thanks for the update, I'm glad you were able to figure out what the issue was. |
| Comment by Ian Hannah [ 27/Dec/18 ] |
|
The query does work. This did not work because the coordinates were in clockwise order rather than counter-clockwise as is required for an inclusive area so this now works. The CRS can therefore be specified using the driver so this issue can be closed. |
| Comment by Ian Hannah [ 27/Dec/18 ] |
|
Please note that the CRS can be specified using the C# driver BUT the query does not work when it is using the inclusive area. Can you please confirm that this is a bug? Can you please give me an update on exactly what the problem is? |
| Comment by Ian Hannah [ 26/Dec/18 ] |
|
I have got the issue down to this query: db.items.find({"GeoPol":{ } The coordinates have been specified in a counter clockwise order which means that, together with the crs, this is an inclusive area. The coordinates of the polygon in the database is defined as: 0.026856601145655,53.3536401702337;-0.018187415636542,53.3543968971421;-0.016935805565727,53.381347118852;-0.01651815359378,53.3903304943447;-0.001490628678547,53.390079813912;-0.001911439808241,53.3810965200027;0.028136611683245,53.3805896527841;0.026856601145655,53.3536401702337 This is well inside the polygon in the query above so why is it not being matched? |
| Comment by Ian Hannah [ 26/Dec/18 ] |
|
This does appear to work but it seems to depend on the order of the coordinates i.e. they must be clockwise or counter-clockwise. Can you please confirm? |