on-internet
← Community

Why do I get the following error : Can't find a codec for class com.mongodb.client.model.geojson.Polygon

Stack Overflow ·

I am trying to do a geospatial query using MongoDB's com.mongodb.client.model.geojson.Polygon class and com.mongodb.client.model.geojson.Position class. The client code populates the four double corners in its own boundingBox object. Here is the code snippet: Polygon polygon = new Polygon(Arrays.asList(new Position(boundingBox.getRightLongitude(),boundingBox.getTopLatitude()), new Position(boundingBox.getLeftLongitude(), boundingBox.getTopLatitude()), new Position(boundingBox.getLeftLongitude(), boundingBox.getBottomLatitude()), new Position(boundingBox.getRightLongitude(), boundingBox.getBott

Comments

Sign in or sign up to comment and upvote.

No comments yet.