[JAVA-3646] GeoJSON Geometry codecs only accept positions as doubles Created: 04/Mar/20  Updated: 28/Oct/23  Resolved: 06/Apr/20

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: 3.12.3, 4.0.2

Type: Bug Priority: Major - P3
Reporter: Oren Ovadia Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

The GeoJSON spec says that positions should be decimal values.
And the java driver correctly expects a BsonDouble .
 
However, mongod, allows one to index geometries with integer positions when a geo spatial index is defined.
 
I am not convinced that it should be okay to deserialize integral positions, but assuming one has them indexed in mongo, they won't be able to use codecs to read them. 



 Comments   
Comment by Githook User [ 06/Apr/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Decode all integral value types in GeoJson decoders

JAVA-3646
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/8b6364706cc21fb2ef2277712fab1406cd97e78d

Comment by Githook User [ 06/Apr/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Decode all integral value types in GeoJson decoders

JAVA-3646
Branch: 4.0.x
https://github.com/mongodb/mongo-java-driver/commit/cfc9037d0fae02b803f9fc7b287b7ae6e9417e1e

Comment by Githook User [ 06/Apr/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Decode all integral value types in GeoJson decoders

JAVA-3646
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/40a7ff78380a8044d7e377540c25a277e514d4f8

Comment by Jeffrey Yemin [ 06/Apr/20 ]

We don't have tickets for releases. We just announce them on the community forums.

Comment by Oren Ovadia [ 06/Apr/20 ]

Is there a release ticket for 3.12.3 and 4.0.2?

Thank you!

Generated at Thu Feb 08 09:00:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.