def _geom_index(self, style, db_table,
                    index_type='GIST', index_opts='GIST_GEOMETRY_OPS'):
        sql = (style.SQL_KEYWORD('CREATE INDEX ') +
              style.SQL_TABLE(qn('%s_%s_id' % (db_table, self.column))) +
              style.SQL_KEYWORD(' ON ') +
              style.SQL_TABLE(qn(db_table)) +
              style.SQL_KEYWORD(' USING ') +
              style.SQL_COLTYPE(index_type) + ' ( ' +
              style.SQL_FIELD(qn(self.column)) + ' ' +
              style.SQL_KEYWORD(index_opts) + ' );')
        return sql
Creates a GiST index for this geometry field.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/db/backend/postgis/field.py/PostGISField._geom_index