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:
Michael Hunger
2014-03-31 01:55:07 +02:00
parent e7bb4a1258
commit 4bcf040527

View File

@@ -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