Skip to content

Commit

Permalink
add other items
Browse files Browse the repository at this point in the history
  • Loading branch information
bertt committed Dec 12, 2024
1 parent 15400ec commit e1a0dd7
Show file tree
Hide file tree
Showing 6 changed files with 2,169 additions and 7 deletions.
17 changes: 17 additions & 0 deletions cityjson.core.tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ namespace CityJSON.Tests
{
public class UnitTest1
{
[Test]
public void ReadBuildingWithInnerRingTest()
{
var json = File.ReadAllText("./fixtures/building_with_innerring.city.json");
var cityjson = JsonConvert.DeserializeObject<CityJsonDocument>(json);

Assert.That(cityjson.Type, Is.EqualTo("CityJSON"));
Assert.That(cityjson.Version, Is.EqualTo("1.0"));

var wkt = cityjson.ToWkt();
var reader = new NetTopologySuite.IO.WKTReader();
var geom = reader.Read(wkt);

Assert.That(geom.GeometryType, Is.EqualTo("MultiPolygon"));
Assert.That(geom.NumGeometries, Is.EqualTo(102));

}

[Test]
public void ReadCityJsonSeqFileMinimal()
Expand Down
3 changes: 3 additions & 0 deletions cityjson.core.tests/cityjson.core.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<None Update="fixtures\25gn1_04_2020_gebouwen.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="fixtures\building_with_innerring.city.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="fixtures\simplegeom\v2.0\csol.city.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Loading

0 comments on commit e1a0dd7

Please sign in to comment.