Skip to main content
Question

Does MongoDB writer support multi-polygon geometry type?

  • November 6, 2017
  • 2 replies
  • 31 views

fmeuser_gc
Contributor
Forum|alt.badge.img+9

Couldn't write to MongoDB with multi-polygon geometry. I get this error.

MONGODB writer: Bulk write: OperationException: { index: 890, code: 16755, errmsg: "Can't extract geo keys: { _id: ObjectId('59fcc51628de9b19a60bf281')

Any parameters to be changed for bulk write/multi-polygon geometry type?

Thanks.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

richardatsafe
Safer
Forum|alt.badge.img+10

Hi @fmeuser_gc,

The mongo db writer does support a multi-polygon. Possibly it may be a malformed geometry. It may be worth passing the geometry through a GeometryValidator to confirm the geometry, and confirm that the fme_geometry type going in is aggregate. Are you generating the geometry within FME with an aggreagtor?


jakemolnar
Forum|alt.badge.img
  • November 6, 2017

First thing, there should be an option to turn off bulk writing in the writer settings:

Advanced > Use Bulk Inserts: No

 

Turning off bulk inserts can help you pinpoint exactly which feature is causing the problem, and often MongoDB gives us a better error message too.

In your case, I suspect either:

  • MongoDB considers your geometry is invalid somehow (eg. self-intersection, 0 rings, etc.)
  • Your geometry exceeds the limits of the LL-WGS84 coordinate system (ie. has a vertex beyond the bounding box of x in [-180,180] and y in [-90,90]

Can you try rerunning with non-bulk inserts and post the log message? It would also be helpful to log the offending feature if possible.