Skip to content

Commit 7e5d473

Browse files
authored
CityObjectListのシンボル名修正 (Synesthesias#178)
1 parent 3122767 commit 7e5d473

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

wrappers/csharp/LibPLATEAU.NET/CSharpPLATEAU.Test/GeometryModel/MeshExtractorTests.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,21 @@ public void CityObjectIndexExistsForEveryUV4Value()
3838
Assert.IsNotNull(primaryGmlID, "UV4に含まれている値はCityObjectListにも含まれている");
3939
}
4040
}
41+
42+
[TestMethod]
43+
public void CityObjectIndexCanGetFromGmlID()
44+
{
45+
var model = TestGeometryUtil.ExtractModel();
46+
var foundMesh = TestGeometryUtil.FirstMeshInModel(model);
47+
var cityObjectList = foundMesh.CityObjectList;
48+
foreach (var index in cityObjectList.GetAllKeys())
49+
{
50+
var gmlID = cityObjectList.GetAtomicID(index);
51+
var actualIndex = cityObjectList.GetCityObjectIndex(gmlID);
52+
53+
Assert.AreEqual(index.AtomicIndex, actualIndex.AtomicIndex);
54+
Assert.AreEqual(index.PrimaryIndex, actualIndex.PrimaryIndex);
55+
}
56+
}
4157
}
4258
}

wrappers/csharp/LibPLATEAU.NET/CSharpPLATEAU/PolygonMesh/CityObjectList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public string GetAtomicID(CityObjectIndex index)
6262
/// </summary>
6363
public CityObjectIndex GetCityObjectIndex(string gmlID)
6464
{
65-
var result = NativeMethods.plateau_city_object_list_get_city_gml_index(Handle, out var index, gmlID);
65+
var result = NativeMethods.plateau_city_object_list_get_city_object_index(Handle, out var index, gmlID);
6666
DLLUtil.CheckDllError(result);
6767
return index;
6868
}
@@ -88,7 +88,7 @@ internal static extern APIResult plateau_city_object_list_get_atomic_id(
8888
[In] CityObjectIndex index);
8989

9090
[DllImport(DLLUtil.DllName)]
91-
internal static extern APIResult plateau_city_object_list_get_city_gml_index(
91+
internal static extern APIResult plateau_city_object_list_get_city_object_index(
9292
[In] IntPtr handle,
9393
out CityObjectIndex index,
9494
[In] string gmlID);

0 commit comments

Comments
 (0)