internal static string ExportSpatialReference(int export_flags, com.epl.geometry.SpatialReference spatial_reference) { if (spatial_reference == null || (export_flags & com.epl.geometry.GeoJsonExportFlags.geoJsonExportSkipCRS) != 0) { throw new System.ArgumentException(string.Empty); } com.epl.geometry.JsonWriter json_writer = new com.epl.geometry.JsonStringWriter(); ExportSpatialReference(export_flags, spatial_reference, json_writer); return((string)json_writer.GetJson()); }
// Mirrors wkt internal static string ExportToGeoJson(int export_flags, com.epl.geometry.Geometry geometry, com.epl.geometry.SpatialReference spatial_reference) { if (geometry == null) { throw new System.ArgumentException(string.Empty); } com.epl.geometry.JsonWriter json_writer = new com.epl.geometry.JsonStringWriter(); json_writer.StartObject(); ExportGeometryToGeoJson_(export_flags, geometry, json_writer); if ((export_flags & com.epl.geometry.GeoJsonExportFlags.geoJsonExportSkipCRS) == 0) { json_writer.AddFieldName("crs"); ExportSpatialReference(export_flags, spatial_reference, json_writer); } json_writer.EndObject(); return((string)json_writer.GetJson()); }
internal static string ExportToString(com.epl.geometry.Geometry geometry, com.epl.geometry.SpatialReference spatialReference, System.Collections.Generic.IDictionary <string, object> exportProperties) { com.epl.geometry.JsonWriter jsonWriter = new com.epl.geometry.JsonStringWriter(); ExportToJson_(geometry, spatialReference, jsonWriter, exportProperties); return((string)jsonWriter.GetJson()); }