You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2020/10/05 01:06:27 UTC
[incubator-sedona] branch jtsplus updated: Update the circle type
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch jtsplus
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git
The following commit(s) were added to refs/heads/jtsplus by this push:
new 1ea8ef2 Update the circle type
1ea8ef2 is described below
commit 1ea8ef2f11ed34f9ffd5a73809e70a69ffd70050
Author: Jia Yu <ji...@apache.org>
AuthorDate: Sun Oct 4 18:06:13 2020 -0700
Update the circle type
---
.../geospark/geometryObjects/Circle.java | 32 ++++++++++++++++++----
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/core/src/main/java/org/datasyslab/geospark/geometryObjects/Circle.java b/core/src/main/java/org/datasyslab/geospark/geometryObjects/Circle.java
index f028aba..2b2720f 100644
--- a/core/src/main/java/org/datasyslab/geospark/geometryObjects/Circle.java
+++ b/core/src/main/java/org/datasyslab/geospark/geometryObjects/Circle.java
@@ -372,17 +372,27 @@ public class Circle
return newCircle;
}
- /* (non-Javadoc)
- * @see org.locationtech.jts.geom.Geometry#clone()
- */
@Override
- public Object clone()
+ protected Geometry reverseInternal()
+ {
+ Geometry g = this.centerGeometry.reverse();
+ Circle newCircle = new Circle(this.centerGeometry.reverse(), this.radius);
+ return new Circle(this.centerGeometry.reverse(), this.radius);
+ }
+
+ public Geometry copy()
{
- Geometry g = (Geometry) this.centerGeometry.clone();
- Circle cloneCircle = new Circle(g, this.radius);
+ Circle cloneCircle = new Circle(this.centerGeometry.copy(), this.radius);
return cloneCircle;// return the clone
}
+ @Override
+ protected Geometry copyInternal()
+ {
+ Circle cloneCircle = new Circle(this.centerGeometry.copy(), this.radius);
+ return cloneCircle;
+ }
+
/* (non-Javadoc)
* @see org.locationtech.jts.geom.Geometry#equalsExact(org.locationtech.jts.geom.Geometry, double)
*/
@@ -496,6 +506,16 @@ public class Circle
return 0;
}
+ /**
+ * TypeCode 0 - 7 have been reserved for other geometry types
+ * @return
+ */
+ @Override
+ protected int getTypeCode()
+ {
+ return 8;
+ }
+
@Override
public String toString()
{