I'm trying to use INTERSECTS operation with Querydsl:
PolygonPath<Polygon> polygonpath = new PolygonPath<Polygon>(entityPath, "location");
Geometry geometry = Wkt.fromWkt("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
BooleanExpression intersectsExpression = polygonpath.intersects(geometry);
and when generates BooleanExpression i'm getting the following message:
unknown operation with operator com.mysema.query.spatial.SpatialOps#INTERSECTS and args [entity.location, POLYGON((30 10,40 40,20 40,10 20,30 10))]
I'm using HibernateSpatial.. then i'm trying to do the following:
Create my own class based on your HibernateSpatialSupport to create a valid intersects operation to use on HibernateSpatial.
I've created an HibernateSpatialOps with:
private static final String NS = HibernateSpatialOps.class.getName();
public static final Operator<Object> INTERSECTS = new OperatorImpl<Object>(
NS, "intersects({0}, {1})");
When i generate BooleanExpression with intersects operation appears the following message:
unknown operation with operator org.project1.querydsl.HibernateSpatialOps#intersects({0}, {1}) and args [entity.location, POLYGON ((-0.948944091796875 39.49052944781087, -0.4988479614257812 39.49052944781087, -0.4988479614257812 39.39030533696812, -0.948944091796875 39.39030533696812, -0.948944091796875 39.49052944781087))]
Can you help me?
Best Regards,