Skip to content
Simon Bartlett edited this page Jan 26, 2013 · 1 revision

Geo can read and write GeoJSON. Objects that implement IGeoJsonObject can be read and written to GeoJSON.

GeoJSON

There are two types specific to GeoJSON:

  • Feature
  • FeatureCollection

Reading

var reader = new GeoJsonReader();
IGeoJsonObject point = reader.Read("{ \"type\": \"Point\", \"coordinates\": [100.0, 0.0] }"); // reading a string

Writing

var writer = new GeoJsonWriter();
var pointJson = writer.Write(new Point(68.389, 73.89));
Clone this wiki locally