示例#1
0
            internal virtual void WritePoint(MappingWriter pointWriter, Point property)
            {
                pointWriter.WriteString("type", property.GeometryType);
                //write coordinates
                ListWriter coordinatesWriter = pointWriter.NewList(RepresentationType.Double, "coordinates");

                foreach (double?coordinate in property.Coordinate.Coordinate)
                {
                    coordinatesWriter.writeFloatingPointNumber(RepresentationType.Double, coordinate);
                }
                coordinatesWriter.Done();

                //Write coordinate reference system
                CRS           crs       = property.CRS;
                MappingWriter crsWriter = pointWriter.NewMapping(RepresentationType.Map, "crs");

                crsWriter.WriteInteger(RepresentationType.Integer, "srid", crs.Code);
                crsWriter.WriteString("name", crs.Type);
                crsWriter.WriteString("type", "link");
                MappingWriter propertiesWriter = crsWriter.NewMapping(Representation.Map, "properties");

                propertiesWriter.WriteString("href", crs.Href + "ogcwkt/");
                propertiesWriter.WriteString("type", "ogcwkt");
                propertiesWriter.Done();
                crsWriter.Done();
            }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchDoubleArrayProperty(PropertyArray<double[], double> array, String param)
            protected internal override Void DispatchDoubleArrayProperty(PropertyArray <double[], double> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Double, param);

                foreach (double?d in array)
                {
                    list.writeFloatingPointNumber(RepresentationType.Double, d);
                }
                list.Done();
                return(null);
            }
示例#3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchFloatArrayProperty(PropertyArray<float[], float> array, String param)
            protected internal override Void DispatchFloatArrayProperty(PropertyArray <float[], float> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Float, param);

                foreach (float?f in array)
                {
                    list.writeFloatingPointNumber(RepresentationType.Float, f);
                }
                list.Done();
                return(null);
            }