Looking at the converters provided it seems that StjFeatureConverter is internal and the expected use case is to use the GeoJsonConverterFactory.
Since the GeoJsonConverterFactory supports working with Geometry and Feature and then FeatureCollection it seems like it would make sense to expose them for use from other converters which derive from the GeoJsonConverterFactory.
Arc and CoordinateReferenceSystem which are just Features which specific properties.
The most basic definition of Arc would be something like this:
public class Arc
{
/// <summary>
/// The positions.
/// </summary>
public List<NetTopologySuite.Geometries.Point> Positions { get; set; }
/// <summary>
/// Constructs an arc from a given list of positions. The must be at least two positions.
/// </summary>
/// <param name="positions">The positions.</param>
public Arc(List<NetTopologySuite.Geometries.Point> positions)=> this.Positions = positions;
/// <summary>
/// Default constructor.
/// </summary>
public Arc() => Positions = new();
}
See https://github.com/topojson/topojson
There is already an implementation which was using Newtonsoft @ https://github.com/Freddixx/TopoJSON.Net
Looking at the converters provided it seems that
StjFeatureConverter
is internal and the expected use case is to use theGeoJsonConverterFactory
.Since the
GeoJsonConverterFactory
supports working withGeometry
andFeature
and thenFeatureCollection
it seems like it would make sense to expose them for use from other converters which derive from theGeoJsonConverterFactory
.An example of topojson is as follows:
Same example only quantized:
The main types which would need support are:
Arc
andCoordinateReferenceSystem
which are justFeatures
which specific properties.The most basic definition of
Arc
would be something like this: