Skip to content

PostGIS: Create referencing entities from contained geometries

Plugin ID: eca_geofield_postgis_create_referencing_entities

Available since: 1.0.0

Queries entities inside a polygon and creates new entities that reference each match via an entity reference field.

Fields

Source polygon — config key: source_polygon

The bounding polygon geometry (EWKB hex). Supports ECA token replacement.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Target entity type — config key: target_entity_type

Machine name of the entity type to query (e.g. node).
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Target bundle — config key: target_bundle

Machine name of the bundle to query.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Target Geofield machine name — config key: target_field

Machine name of the Geofield field on the target entity type (e.g. field_location).
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Target geometry type — config key: target_geom_type

PostGIS geometry type filter, e.g. ST_Point or ST_LineString.
This field supports tokens.

Type: textfield · Required: yes · Default: ST_LineString

New entity type — config key: new_entity_type

Machine name of the entity type to create (e.g. node).
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

New bundle — config key: new_bundle

Machine name of the bundle for the new entities.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

New entity reference field machine name — config key: new_reference_field

Machine name of the entity reference field on the new entity type that will store a reference to each matched entity.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Extra entity field values — config key: extra_entity_fields

Optional. One assignment per line: field_name=value_or_token. Token replacement is applied to each value. Example: project=[entity:id]

Type: textarea · Required: no · Default: empty string

Spatial operator — config key: spatial_operator

PostGIS function used to match geometries. Use ST_Intersects for linestrings (roads) that cross the polygon boundary; ST_Contains for geometries fully inside.

Type: select · Required: yes · Default: ST_Intersects

Allowed values: ST_Contains, ST_Intersects, ST_Within, ST_CoveredBy, ST_Overlaps