Пример #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
 private static void VerifyPoint(Point point, CRS expectedCRS, params Double[] expectedCoordinate)
 {
     assertEquals(expectedCRS.Code, point.CRS.Code);
     assertEquals(asList(expectedCoordinate), point.Coordinate.Coordinate);
 }