DATAGRAPH-454
Support for Common Geospatial Types and Derived spatial Queries reverting the change to Point as property as it is not serializable
This commit is contained in:
@@ -21,6 +21,7 @@ import org.springframework.data.annotation.Transient;
|
||||
import org.springframework.data.geo.Point;
|
||||
import org.springframework.data.neo4j.annotation.*;
|
||||
import org.springframework.data.neo4j.fieldaccess.DynamicProperties;
|
||||
import org.springframework.data.neo4j.repository.GeoConverter;
|
||||
import org.springframework.data.neo4j.support.index.IndexType;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
@@ -51,7 +52,8 @@ public class Person implements Being , Serializable {
|
||||
private String alias;
|
||||
|
||||
@Indexed(indexType = IndexType.POINT, indexName="personLayer")
|
||||
private Point wkt;
|
||||
private String wkt;
|
||||
// private Point wkt;
|
||||
|
||||
@Max(100)
|
||||
@Min(0)
|
||||
@@ -201,7 +203,7 @@ public class Person implements Being , Serializable {
|
||||
}
|
||||
|
||||
public void setLocation(double lon, double lat) {
|
||||
this.wkt = new Point(lon,lat);
|
||||
this.wkt = GeoConverter.toWellKnownText(new Point(lon,lat));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user