Relative Content

Tag Archive for mongodbviewpluginsgeoserver

How to create layers from mongo collection with more than one geometry field in MongoDB plugin

I’m using the MongoDB GeoTools plugin on GeoServer 2.25. I can successfully expose one if my collections as a layer in GeoServer with a single geometry in it. However, I want to expose a collection with 4 separate geometry fields (each with a 2dsphere index) using each geometry field in a separate layer. It appears that when I go to create the first layer only the first of the 4 geometry fields is recognized as a geometry field. I’ve tried manually adding the rest, and GeoServer throws an error saying those additional attributes are unavailable in the data source. I can not figure a way to get MongoDB plugin to see more than the first geometry in the collection.