tlarsendataguy-yxdb / yxdb-net

A .NET library for reading the YXDB file format
MIT License
1 stars 0 forks source link

yxdb-net

yxdb-net is a library for reading YXDB files into .NET applications.

Install from NuGet. The package is compiled against .NET Standard 2.0.

The library has 1 depdency to Microsoft's System.Text.Json package and is a pure C# solution.

The public API is contained in the YxdbReader class. Instantiate YxdbReader using one of the two constructors:

Iterate through the records in the file using the next() method in a while loop:

while (reader.Next()) {
    // do something
}

Fields can be access via the readX() methods on the YxdbReader class. There are readers for each kind of data field supported by YXDB files:

Each read method has 2 overloads:

If either the index number or field name is invalid, the read methods will throw an exception.

To read spatial objects, use the yxdb.Spatial.ToGeoJson() function. The ToGeoJson() function translates the binary SpatialObj format into a GeoJSON string.