You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I like this project but I need Geospatial Fields like Point and Polygon and Geospatial queries which can be found in Mongoengine.
Is there any way or plan for these?
The text was updated successfully, but these errors were encountered:
There's been prior discussion about this a while (4 years) ago in #248.
It might be worth checking the state of geojeon and pymongo to see if those considerations still apply. Is geojson still the way to go? Does pymongo provide some sort of geojson support? What about the other drivers? What are the exact supported features in latest MongoDB versions?
I've been using a custom Point in my app:
frommarshmallowimportValidationError, fieldsasma_fieldsimportgeojsonfromumongo.i18nimportgettextas_classPoint(ma_fields.Field):
def_serialize(self, value, attr, obj):
ifvalueisNone:
returnNone# Item access works for both Mongo world and OO worldreturnvalue['coordinates']
def_deserialize(self, value, attr, data, **kwargs):
ifisinstance(value, geojson.Point):
returnvaluetry:
# TODO: Add unit tests. Seriously.# Should work for both Mongo world and OO worldreturngeojson.Point(value)
exceptValueError:
raiseValidationError(_('Invalid Point.'))
Hi.
I like this project but I need Geospatial Fields like Point and Polygon and Geospatial queries which can be found in Mongoengine.
Is there any way or plan for these?
The text was updated successfully, but these errors were encountered: