swamirishi commented on a change in pull request #536:
URL: https://github.com/apache/incubator-sedona/pull/536#discussion_r695177875



##########
File path: 
core/src/main/java/org/apache/sedona/core/geometryObjects/schema/CoordinateSchema.java
##########
@@ -0,0 +1,39 @@
+package org.apache.sedona.core.geometryObjects.schema;
+
+import com.google.common.collect.Lists;
+import org.apache.sedona.core.io.avro.constants.AvroConstants;
+import org.apache.sedona.core.io.avro.schema.Field;
+import org.apache.sedona.core.io.avro.schema.SimpleSchema;
+import org.apache.sedona.core.io.avro.schema.RecordSchema;
+import org.apache.sedona.core.utils.SedonaUtils;
+
+public class CoordinateSchema extends RecordSchema {
+    public static final String X_COORDINATE = "x";
+    public static final String Y_COORDINATE = "y";
+    public static final String COORDINATE = "coordinate";
+    
+    private CoordinateSchema() {
+        super(AvroConstants.SEDONA_NAMESPACE,COORDINATE,
+              Lists.newArrayList(new Field(X_COORDINATE, new 
SimpleSchema(AvroConstants.PrimitiveDataType.DOUBLE)),
+                                 new Field(Y_COORDINATE, new 
SimpleSchema(AvroConstants.PrimitiveDataType.DOUBLE))));
+    }
+    
+    private static CoordinateSchema schema;
+    
+    public static CoordinateSchema getSchema(){
+        if(SedonaUtils.isNull(schema)){
+            synchronized (CoordinateSchema.class){
+                if(SedonaUtils.isNull(schema)){
+                    schema = new CoordinateSchema();
+                }
+            }
+        }
+        return schema;
+    }
+
+//    public CoordinateSchema(String name, String namespace) {

Review comment:
       Sure




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to