public string Write(IGeoJsonObject obj) { var geometry = obj as IGeoJsonGeometry; if (geometry != null) { return(Write(geometry)); } var feature = obj as Feature; if (feature != null) { return(Write(feature)); } var featureCollection = obj as FeatureCollection; if (featureCollection != null) { return(Write(featureCollection)); } throw new SerializationException("Object of type '" + obj.GetType().Name + "' is not supported by GeoJSON"); }
public string Write(IGeoJsonObject obj) { var geometry = obj as IGeoJsonGeometry; if (geometry != null) return Write(geometry); var feature = obj as Feature; if (feature != null) return Write(feature); var featureCollection = obj as FeatureCollection; if (featureCollection != null) return Write(featureCollection); throw new SerializationException("Object of type '" + obj.GetType().Name + "' is not supported by GeoJSON"); }
public static string Serialize(IGeoJsonObject obj) { return(Writer.Write(obj)); }
public static string Serialize(IGeoJsonObject obj) { return Writer.Write(obj); }