OS OpenSpace C# boundaries class

I wanted to get the boundary data out of OS OpenSpace via C#. So I hacked the AJAX interface and came up with this code. You'll need to get an OS OpenSpace API key to use it and it requires .NET 3.5.

Download the source.

Download the assembly.

Read the documentation.

Usage is as follows -

      Boundaries osBoundaries = new Boundaries("your API key");
      Boundary[] boundaries = osBoundaries.GetBoundaries("CTY");
      foreach (Boundary boundary in boundaries)
      {
        string countyName = boundary.Name;
        foreach (Polygon polygon in boundary.Polygons)
        {
          // TODO - whatever you like
        }
      }