I'd like to persist a set of Geometries in the database. Afterwards I'd like to query all Documents whose geometries intersect a given Point via Doctrine ODM.
Somehow I have no idea how to create the document-schema via doctrine. I tried several Annotation-Types (see below) to define a geometry-field but either doctrine throws errors at schema:update or the fieldis not being interpreted as Geometry so that I can't query via $queryBuilder->field('geometry')->geointersects($somePoint).
I tried to use these following annotations, but none of them worked as I wanted them to.
@ODM\embedOne(targetDocument=Polygon::class) //from jmikola/GeoJson -> schema-error
$geometry
// or //
@ODM\embedOne(targetDocument=Geometry::class) //own class -> query has no results
$geometry
// or //
@ODM\Field(name="Polygon",type="raw") //array-notation -> illegal type conversion in query
$geometry
// and several others...