private static String createSpatial(String name, int args, boolean asFunction) {
        StringBuilder result = new StringBuilder();
        if (!asFunction) {
            result.append("{0}.");
        }
        result.append(name);
        result.append("(");
        int start = asFunction ? 0 : 1;
        for (int i = start; i < args; i++) {
            if (i > start) {
                result.append(", ");
            }
            result.append("{").append(i).append("}");
        }
        result.append(")");
        return result.toString();
    }
Static factory methods for spatial enabled SQLTemplates subclasses

@author tiwe
querydsl-sql-spatial/src/main/java/com/querydsl/sql/spatial/SpatialTemplatesSupport.java