diff --git a/DotNet/CesiumLanguageWriter.sln b/DotNet/CesiumLanguageWriter.sln
index 0c91f216..6c18d8af 100644
--- a/DotNet/CesiumLanguageWriter.sln
+++ b/DotNet/CesiumLanguageWriter.sln
@@ -10,6 +10,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schema", "Schema", "{04E49F4E-CD74-44F3-9A80-604BCA10FB67}"
ProjectSection(SolutionItems) = preProject
..\Schema\AlignedAxis.json = ..\Schema\AlignedAxis.json
+ ..\Schema\ArcType.json = ..\Schema\ArcType.json
+ ..\Schema\ArcTypeValue.json = ..\Schema\ArcTypeValue.json
..\Schema\BackgroundPadding.json = ..\Schema\BackgroundPadding.json
..\Schema\Billboard.json = ..\Schema\Billboard.json
..\Schema\Boolean.json = ..\Schema\Boolean.json
diff --git a/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs b/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs
index 46aae1c6..976520dd 100644
--- a/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs
+++ b/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs
@@ -426,6 +426,27 @@ public static string LabelStyleToString(CesiumLabelStyle value)
}
}
+ ///
+ /// Converts a to the corresponding string in a CZML stream.
+ ///
+ /// The value to convert.
+ /// The string representing the specified value.
+ [NotNull]
+ public static string ArcTypeToString(CesiumArcType value)
+ {
+ switch (value)
+ {
+ case CesiumArcType.None:
+ return "NONE";
+ case CesiumArcType.Geodesic:
+ return "GEODESIC";
+ case CesiumArcType.Rhumb:
+ return "RHUMB";
+ default:
+ throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "value");
+ }
+ }
+
///
/// Converts a to the corresponding string in a CZML stream.
///
diff --git a/DotNet/CesiumLanguageWriter/CesiumArcType.cs b/DotNet/CesiumLanguageWriter/CesiumArcType.cs
new file mode 100644
index 00000000..4babb6af
--- /dev/null
+++ b/DotNet/CesiumLanguageWriter/CesiumArcType.cs
@@ -0,0 +1,23 @@
+namespace CesiumLanguageWriter
+{
+ ///
+ /// Specifies the type of an arc.
+ ///
+ public enum CesiumArcType
+ {
+ ///
+ /// The arc is a straight line that does not conform to the surface of an ellipsoid.
+ ///
+ None,
+
+ ///
+ /// The arc is a geodesic, which is the shortest path conforming to the surface of an ellipsoid.
+ ///
+ Geodesic,
+
+ ///
+ /// The arc is a rhumb line, or loxodrome, which is the path of constant heading conforming to the surface of an ellipsoid.
+ ///
+ Rhumb,
+ }
+}
\ No newline at end of file
diff --git a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj
index 0e287f7d..faa1ef03 100644
--- a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj
+++ b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj
@@ -76,6 +76,7 @@
+
@@ -99,6 +100,7 @@
Code
+
Code
diff --git a/DotNet/CesiumLanguageWriter/Generated/ArcTypeCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/ArcTypeCesiumWriter.cs
new file mode 100644
index 00000000..acde14ed
--- /dev/null
+++ b/DotNet/CesiumLanguageWriter/Generated/ArcTypeCesiumWriter.cs
@@ -0,0 +1,155 @@
+//
+// This file was generated automatically by GenerateFromSchema. Do NOT edit it.
+// https://github.com/AnalyticalGraphicsInc/czml-writer
+//
+
+using CesiumLanguageWriter.Advanced;
+using System;
+using JetBrains.Annotations;
+
+namespace CesiumLanguageWriter
+{
+ ///
+ /// Writes a ArcType to a . A ArcType is the type of an arc.
+ ///
+ public class ArcTypeCesiumWriter : CesiumPropertyWriter
+ {
+ ///
+ /// The name of the ArcType property.
+ ///
+ public const string ArcTypePropertyName = "ArcType";
+
+ ///
+ /// The name of the reference property.
+ ///
+ public const string ReferencePropertyName = "reference";
+
+ private readonly Lazy> m_asArcType;
+ private readonly Lazy> m_asReference;
+
+ ///
+ /// Initializes a new instance.
+ ///
+ /// The name of the property.
+ public ArcTypeCesiumWriter([NotNull] string propertyName)
+ : base(propertyName)
+ {
+ m_asArcType = new Lazy>(CreateArcTypeAdaptor, false);
+ m_asReference = new Lazy>(CreateReferenceAdaptor, false);
+ }
+
+ ///
+ /// Initializes a new instance as a copy of an existing instance.
+ ///
+ /// The existing instance to copy.
+ protected ArcTypeCesiumWriter([NotNull] ArcTypeCesiumWriter existingInstance)
+ : base(existingInstance)
+ {
+ m_asArcType = new Lazy>(CreateArcTypeAdaptor, false);
+ m_asReference = new Lazy>(CreateReferenceAdaptor, false);
+ }
+
+ ///
+ public override ArcTypeCesiumWriter Clone()
+ {
+ return new ArcTypeCesiumWriter(this);
+ }
+
+ ///
+ /// Writes the value expressed as a ArcType, which is the arc type.
+ ///
+ /// The style of an arc.
+ public void WriteArcType(CesiumArcType value)
+ {
+ const string PropertyName = ArcTypePropertyName;
+ if (ForceInterval)
+ {
+ OpenIntervalIfNecessary();
+ }
+ if (IsInterval)
+ {
+ Output.WritePropertyName(PropertyName);
+ }
+ Output.WriteValue(CesiumFormattingHelper.ArcTypeToString(value));
+ }
+
+ ///
+ /// Writes the value expressed as a reference, which is the arc type specified as a reference to another property.
+ ///
+ /// The reference.
+ public void WriteReference(Reference value)
+ {
+ const string PropertyName = ReferencePropertyName;
+ OpenIntervalIfNecessary();
+ Output.WritePropertyName(PropertyName);
+ CesiumWritingHelper.WriteReference(Output, value);
+ }
+
+ ///
+ /// Writes the value expressed as a reference, which is the arc type specified as a reference to another property.
+ ///
+ /// The earliest date of the interval.
+ public void WriteReference(string value)
+ {
+ const string PropertyName = ReferencePropertyName;
+ OpenIntervalIfNecessary();
+ Output.WritePropertyName(PropertyName);
+ CesiumWritingHelper.WriteReference(Output, value);
+ }
+
+ ///
+ /// Writes the value expressed as a reference, which is the arc type specified as a reference to another property.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The property on the referenced object.
+ public void WriteReference(string identifier, string propertyName)
+ {
+ const string PropertyName = ReferencePropertyName;
+ OpenIntervalIfNecessary();
+ Output.WritePropertyName(PropertyName);
+ CesiumWritingHelper.WriteReference(Output, identifier, propertyName);
+ }
+
+ ///
+ /// Writes the value expressed as a reference, which is the arc type specified as a reference to another property.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The hierarchy of properties to be indexed on the referenced object.
+ public void WriteReference(string identifier, string[] propertyNames)
+ {
+ const string PropertyName = ReferencePropertyName;
+ OpenIntervalIfNecessary();
+ Output.WritePropertyName(PropertyName);
+ CesiumWritingHelper.WriteReference(Output, identifier, propertyNames);
+ }
+
+ ///
+ /// Returns a wrapper for this instance that implements to write a value in ArcType format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both.
+ ///
+ /// The wrapper.
+ public ICesiumValuePropertyWriter AsArcType()
+ {
+ return m_asArcType.Value;
+ }
+
+ private ICesiumValuePropertyWriter CreateArcTypeAdaptor()
+ {
+ return new CesiumWriterAdaptor(this, (me, value) => me.WriteArcType(value));
+ }
+
+ ///
+ /// Returns a wrapper for this instance that implements to write a value in Reference format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both.
+ ///
+ /// The wrapper.
+ public ICesiumValuePropertyWriter AsReference()
+ {
+ return m_asReference.Value;
+ }
+
+ private ICesiumValuePropertyWriter CreateReferenceAdaptor()
+ {
+ return new CesiumWriterAdaptor(this, (me, value) => me.WriteReference(value));
+ }
+
+ }
+}
diff --git a/DotNet/CesiumLanguageWriter/Generated/PolygonCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolygonCesiumWriter.cs
index 6d8e179e..20e93e10 100644
--- a/DotNet/CesiumLanguageWriter/Generated/PolygonCesiumWriter.cs
+++ b/DotNet/CesiumLanguageWriter/Generated/PolygonCesiumWriter.cs
@@ -26,6 +26,11 @@ public class PolygonCesiumWriter : CesiumPropertyWriter
///
public const string PositionsPropertyName = "positions";
+ ///
+ /// The name of the arcType property.
+ ///
+ public const string ArcTypePropertyName = "arcType";
+
///
/// The name of the height property.
///
@@ -103,6 +108,7 @@ public class PolygonCesiumWriter : CesiumPropertyWriter
private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false);
private readonly Lazy m_positions = new Lazy(() => new PositionListCesiumWriter(PositionsPropertyName), false);
+ private readonly Lazy m_arcType = new Lazy(() => new ArcTypeCesiumWriter(ArcTypePropertyName), false);
private readonly Lazy m_height = new Lazy(() => new DoubleCesiumWriter(HeightPropertyName), false);
private readonly Lazy m_extrudedHeight = new Lazy(() => new DoubleCesiumWriter(ExtrudedHeightPropertyName), false);
private readonly Lazy m_stRotation = new Lazy(() => new DoubleCesiumWriter(StRotationPropertyName), false);
@@ -291,6 +297,87 @@ public void WritePositionsPropertyReferences(IEnumerable references)
}
}
+ ///
+ /// Gets the writer for the arcType property. The returned instance must be opened by calling the method before it can be used for writing. The arcType property defines the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ [NotNull]
+ public ArcTypeCesiumWriter ArcTypeWriter
+ {
+ get { return m_arcType.Value; }
+ }
+
+ ///
+ /// Opens and returns the writer for the arcType property. The arcType property defines the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ [NotNull]
+ public ArcTypeCesiumWriter OpenArcTypeProperty()
+ {
+ OpenIntervalIfNecessary();
+ return OpenAndReturn(ArcTypeWriter);
+ }
+
+ ///
+ /// Writes a value for the arcType property as a ArcType value. The arcType property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ /// The style of an arc.
+ public void WriteArcTypeProperty(CesiumArcType value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteArcType(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ /// The reference.
+ public void WriteArcTypePropertyReference(Reference value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ /// The earliest date of the interval.
+ public void WriteArcTypePropertyReference(string value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The property on the referenced object.
+ public void WriteArcTypePropertyReference(string identifier, string propertyName)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(identifier, propertyName);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The hierarchy of properties to be indexed on the referenced object.
+ public void WriteArcTypePropertyReference(string identifier, string[] propertyNames)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(identifier, propertyNames);
+ }
+ }
+
///
/// Gets the writer for the height property. The returned instance must be opened by calling the method before it can be used for writing. The height property defines the height of the polygon when perPositionHeight is false. If not specified, the default value is 0.0.
///
diff --git a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs
index 4067e653..3bbd10ea 100644
--- a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs
+++ b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs
@@ -25,6 +25,11 @@ public class PolylineCesiumWriter : CesiumPropertyWriter
///
public const string PositionsPropertyName = "positions";
+ ///
+ /// The name of the arcType property.
+ ///
+ public const string ArcTypePropertyName = "arcType";
+
///
/// The name of the width property.
///
@@ -72,6 +77,7 @@ public class PolylineCesiumWriter : CesiumPropertyWriter
private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false);
private readonly Lazy m_positions = new Lazy(() => new PositionListCesiumWriter(PositionsPropertyName), false);
+ private readonly Lazy m_arcType = new Lazy(() => new ArcTypeCesiumWriter(ArcTypePropertyName), false);
private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), false);
private readonly Lazy m_granularity = new Lazy(() => new DoubleCesiumWriter(GranularityPropertyName), false);
private readonly Lazy m_material = new Lazy(() => new PolylineMaterialCesiumWriter(MaterialPropertyName), false);
@@ -254,6 +260,87 @@ public void WritePositionsPropertyReferences(IEnumerable references)
}
}
+ ///
+ /// Gets the writer for the arcType property. The returned instance must be opened by calling the method before it can be used for writing. The arcType property defines the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ [NotNull]
+ public ArcTypeCesiumWriter ArcTypeWriter
+ {
+ get { return m_arcType.Value; }
+ }
+
+ ///
+ /// Opens and returns the writer for the arcType property. The arcType property defines the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ [NotNull]
+ public ArcTypeCesiumWriter OpenArcTypeProperty()
+ {
+ OpenIntervalIfNecessary();
+ return OpenAndReturn(ArcTypeWriter);
+ }
+
+ ///
+ /// Writes a value for the arcType property as a ArcType value. The arcType property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ /// The style of an arc.
+ public void WriteArcTypeProperty(CesiumArcType value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteArcType(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ /// The reference.
+ public void WriteArcTypePropertyReference(Reference value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ /// The earliest date of the interval.
+ public void WriteArcTypePropertyReference(string value)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(value);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The property on the referenced object.
+ public void WriteArcTypePropertyReference(string identifier, string propertyName)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(identifier, propertyName);
+ }
+ }
+
+ ///
+ /// Writes a value for the arcType property as a reference value. The arcType property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+ ///
+ /// The identifier of the object which contains the referenced property.
+ /// The hierarchy of properties to be indexed on the referenced object.
+ public void WriteArcTypePropertyReference(string identifier, string[] propertyNames)
+ {
+ using (var writer = OpenArcTypeProperty())
+ {
+ writer.WriteReference(identifier, propertyNames);
+ }
+ }
+
///
/// Gets the writer for the width property. The returned instance must be opened by calling the method before it can be used for writing. The width property defines the width of the polyline. If not specified, the default value is 1.0.
///
@@ -492,7 +579,7 @@ public PolylineMaterialCesiumWriter OpenMaterialProperty()
}
///
- /// Gets the writer for the followSurface property. The returned instance must be opened by calling the method before it can be used for writing. The followSurface property defines whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Gets the writer for the followSurface property. The returned instance must be opened by calling the method before it can be used for writing. The followSurface property defines whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
[NotNull]
public BooleanCesiumWriter FollowSurfaceWriter
@@ -501,7 +588,7 @@ public BooleanCesiumWriter FollowSurfaceWriter
}
///
- /// Opens and returns the writer for the followSurface property. The followSurface property defines whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Opens and returns the writer for the followSurface property. The followSurface property defines whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
[NotNull]
public BooleanCesiumWriter OpenFollowSurfaceProperty()
@@ -511,7 +598,7 @@ public BooleanCesiumWriter OpenFollowSurfaceProperty()
}
///
- /// Writes a value for the followSurface property as a boolean value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Writes a value for the followSurface property as a boolean value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
/// The value.
public void WriteFollowSurfaceProperty(bool value)
@@ -523,7 +610,7 @@ public void WriteFollowSurfaceProperty(bool value)
}
///
- /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
/// The reference.
public void WriteFollowSurfacePropertyReference(Reference value)
@@ -535,7 +622,7 @@ public void WriteFollowSurfacePropertyReference(Reference value)
}
///
- /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
/// The earliest date of the interval.
public void WriteFollowSurfacePropertyReference(string value)
@@ -547,7 +634,7 @@ public void WriteFollowSurfacePropertyReference(string value)
}
///
- /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
/// The identifier of the object which contains the referenced property.
/// The property on the referenced object.
@@ -560,7 +647,7 @@ public void WriteFollowSurfacePropertyReference(string identifier, string proper
}
///
- /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is .
+ /// Writes a value for the followSurface property as a reference value. The followSurface property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is .
///
/// The identifier of the object which contains the referenced property.
/// The hierarchy of properties to be indexed on the referenced object.
diff --git a/DotNet/CesiumLanguageWriterTests/TestGenerateValidationDocument.cs b/DotNet/CesiumLanguageWriterTests/TestGenerateValidationDocument.cs
index 55c0c985..5f93b173 100644
--- a/DotNet/CesiumLanguageWriterTests/TestGenerateValidationDocument.cs
+++ b/DotNet/CesiumLanguageWriterTests/TestGenerateValidationDocument.cs
@@ -904,6 +904,11 @@ private void WriteConstantValues()
w2.WriteCartesian(CreateList(new Cartesian(39143, 2200, 6408), new Cartesian(27161, 33386, 62338)));
m_assertionsWriter.WriteLine(" expect(e.polygon.hierarchy.getValue(date)).toEqual([ new Cartesian3(39143, 2200, 6408), new Cartesian3(27161, 33386, 62338) ]);");
}
+ using (var w2 = w.OpenArcTypeProperty())
+ {
+ w2.WriteArcType(CesiumArcType.Rhumb);
+ m_assertionsWriter.WriteLine(" expect(e.polygon.arcType.getValue(date)).toEqual(ArcType.RHUMB);");
+ }
using (var w2 = w.OpenHeightProperty())
{
w2.WriteNumber(26391.0);
@@ -998,6 +1003,11 @@ private void WriteConstantValues()
w2.WriteCartesian(CreateList(new Cartesian(23333, 31067, 17529), new Cartesian(57924, 41186, 31648)));
m_assertionsWriter.WriteLine(" expect(e.polyline.positions.getValue(date)).toEqual([ new Cartesian3(23333, 31067, 17529), new Cartesian3(57924, 41186, 31648) ]);");
}
+ using (var w2 = w.OpenArcTypeProperty())
+ {
+ w2.WriteArcType(CesiumArcType.Rhumb);
+ m_assertionsWriter.WriteLine(" expect(e.polyline.arcType.getValue(date)).toEqual(ArcType.RHUMB);");
+ }
using (var w2 = w.OpenWidthProperty())
{
w2.WriteNumber(14667.0);
@@ -1019,11 +1029,6 @@ private void WriteConstantValues()
}
}
}
- using (var w2 = w.OpenFollowSurfaceProperty())
- {
- w2.WriteBoolean(true);
- m_assertionsWriter.WriteLine(" expect(e.polyline.followSurface.getValue(date)).toEqual(true);");
- }
using (var w2 = w.OpenShadowsProperty())
{
w2.WriteShadowMode(CesiumShadowMode.CastOnly);
@@ -8280,6 +8285,11 @@ private void WriteReferenceValues()
w2.WriteReferences(CreateList(new Reference("ConstantPosition1", CreateList("position")), new Reference("ConstantPosition2", CreateList("position"))));
m_assertionsWriter.WriteLine(" expect(e.polygon.hierarchy.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]);");
}
+ using (var w2 = w.OpenArcTypeProperty())
+ {
+ w2.WriteReference(new Reference("Constant", CreateList("polygon", "arcType")));
+ m_assertionsWriter.WriteLine(" expect(e.polygon.arcType.getValue(date)).toEqual(constant.polygon.arcType.getValue(date));");
+ }
using (var w2 = w.OpenHeightProperty())
{
w2.WriteReference(new Reference("Constant", CreateList("polygon", "height")));
@@ -8372,6 +8382,11 @@ private void WriteReferenceValues()
w2.WriteReferences(CreateList(new Reference("ConstantPosition1", CreateList("position")), new Reference("ConstantPosition2", CreateList("position"))));
m_assertionsWriter.WriteLine(" expect(e.polyline.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]);");
}
+ using (var w2 = w.OpenArcTypeProperty())
+ {
+ w2.WriteReference(new Reference("Constant", CreateList("polyline", "arcType")));
+ m_assertionsWriter.WriteLine(" expect(e.polyline.arcType.getValue(date)).toEqual(constant.polyline.arcType.getValue(date));");
+ }
using (var w2 = w.OpenWidthProperty())
{
w2.WriteReference(new Reference("Constant", CreateList("polyline", "width")));
@@ -8391,11 +8406,6 @@ private void WriteReferenceValues()
m_assertionsWriter.WriteLine(" expect(e.polyline.material.color.getValue(date)).toEqual(constant.polyline.material.color.getValue(date));");
}
}
- using (var w2 = w.OpenFollowSurfaceProperty())
- {
- w2.WriteReference(new Reference("Constant", CreateList("polyline", "followSurface")));
- m_assertionsWriter.WriteLine(" expect(e.polyline.followSurface.getValue(date)).toEqual(constant.polyline.followSurface.getValue(date));");
- }
using (var w2 = w.OpenShadowsProperty())
{
w2.WriteReference(new Reference("Constant", CreateList("polyline", "shadows")));
diff --git a/DotNet/GenerateFromSchema/GenerateCSharp.config.json b/DotNet/GenerateFromSchema/GenerateCSharp.config.json
index c18612f4..eb0d39ca 100644
--- a/DotNet/GenerateFromSchema/GenerateCSharp.config.json
+++ b/DotNet/GenerateFromSchema/GenerateCSharp.config.json
@@ -782,6 +782,19 @@
"needsInterval": false
}
],
+ "ArcType": [
+ {
+ "parameters": [
+ {
+ "type": "CesiumArcType",
+ "name": "value",
+ "description": "The style of an arc."
+ }
+ ],
+ "writeValue": "Output.WriteValue(CesiumFormattingHelper.ArcTypeToString(value));",
+ "needsInterval": false
+ }
+ ],
"CornerType": [
{
"parameters": [
diff --git a/DotNet/GenerateFromSchema/ValidationDocumentGenerator.cs b/DotNet/GenerateFromSchema/ValidationDocumentGenerator.cs
index 91d70ca5..7646b817 100644
--- a/DotNet/GenerateFromSchema/ValidationDocumentGenerator.cs
+++ b/DotNet/GenerateFromSchema/ValidationDocumentGenerator.cs
@@ -182,7 +182,7 @@ public override void Generate(Schema schema)
}
else
{
- foreach (var subProperty in properties.Where(p => !p.IsValue))
+ foreach (var subProperty in properties.Where(p => !p.IsValue && !ExcludeSubPropertyFromValidation(p.Name)))
{
writer.WriteLine("using (var w2 = w.Open{0}Property())", subProperty.NameWithPascalCase);
using (writer.OpenScope())
@@ -293,7 +293,7 @@ public override void Generate(Schema schema)
}
}
- foreach (var subProperty in properties.Where(p => !p.IsValue))
+ foreach (var subProperty in properties.Where(p => !p.IsValue && !ExcludeSubPropertyFromValidation(p.Name)))
{
string subPropertyName = GetSubPropertyName(propertyName, subProperty);
@@ -553,7 +553,7 @@ public override void Generate(Schema schema)
}
else
{
- foreach (var subProperty in properties.Where(p => !p.IsValue))
+ foreach (var subProperty in properties.Where(p => !p.IsValue && !ExcludeSubPropertyFromValidation(p.Name)))
{
properties = subProperty.ValueType.Properties;
@@ -1078,6 +1078,18 @@ public override void Generate(Schema schema)
}
}
+ private static bool ExcludeSubPropertyFromValidation(string subPropertyName)
+ {
+ switch (subPropertyName)
+ {
+ case "followSurface":
+ // handled specially in Cesium by converting to arcType on the client side, so our validation assertions won't work.
+ return true;
+ default:
+ return false;
+ }
+ }
+
private static string GetSubPropertyName(string propertyName, Property subProperty)
{
string subPropertyName = subProperty.Name;
@@ -1400,6 +1412,13 @@ int GetNumber(int n)
valueType = "CesiumLabelStyle";
return;
}
+ case "ArcType":
+ {
+ value = "CesiumArcType.Rhumb";
+ assertionValue = "ArcType.RHUMB";
+ valueType = "CesiumArcType";
+ return;
+ }
case "CornerType":
{
value = "CesiumCornerType.Beveled";
diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/ArcTypeCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/ArcTypeCesiumWriter.java
new file mode 100644
index 00000000..385157ca
--- /dev/null
+++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/ArcTypeCesiumWriter.java
@@ -0,0 +1,227 @@
+package cesiumlanguagewriter;
+
+
+import agi.foundation.compatibility.*;
+import agi.foundation.compatibility.Func1;
+import agi.foundation.compatibility.Lazy;
+import cesiumlanguagewriter.advanced.*;
+import cesiumlanguagewriter.CesiumArcType;
+import cesiumlanguagewriter.Reference;
+import javax.annotation.Nonnull;
+
+/**
+ *
+ Writes a {@code ArcType} to a {@link CesiumOutputStream}. A {@code ArcType} is the type of an arc.
+
+
+ */
+@SuppressWarnings( {
+ "unused",
+ "deprecation",
+ "serial"
+})
+public class ArcTypeCesiumWriter extends CesiumPropertyWriter {
+ /**
+ *
+ The name of the {@code ArcType} property.
+
+
+ */
+ public static final String ArcTypePropertyName = "ArcType";
+ /**
+ *
+ The name of the {@code reference} property.
+
+
+ */
+ public static final String ReferencePropertyName = "reference";
+ private Lazy> m_asArcType;
+ private Lazy> m_asReference;
+
+ /**
+ *
+ Initializes a new instance.
+
+
+
+ * @param propertyName The name of the property.
+ */
+ public ArcTypeCesiumWriter(@Nonnull String propertyName) {
+ super(propertyName);
+ m_asArcType = new Lazy>(new Func1>(this,
+ "createArcTypeAdaptor") {
+ public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() {
+ return createArcTypeAdaptor();
+ }
+ }, false);
+ m_asReference = new Lazy>(new Func1>(this,
+ "createReferenceAdaptor") {
+ public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() {
+ return createReferenceAdaptor();
+ }
+ }, false);
+ }
+
+ /**
+ *
+ Initializes a new instance as a copy of an existing instance.
+
+
+
+ * @param existingInstance The existing instance to copy.
+ */
+ protected ArcTypeCesiumWriter(@Nonnull ArcTypeCesiumWriter existingInstance) {
+ super(existingInstance);
+ m_asArcType = new Lazy>(new Func1>(this,
+ "createArcTypeAdaptor") {
+ public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() {
+ return createArcTypeAdaptor();
+ }
+ }, false);
+ m_asReference = new Lazy>(new Func1>(this,
+ "createReferenceAdaptor") {
+ public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() {
+ return createReferenceAdaptor();
+ }
+ }, false);
+ }
+
+ /**
+ *
+
+ Copies this instance and returns the copy.
+
+
+
+ * @return The copy.
+ */
+ @Override
+ public ArcTypeCesiumWriter clone() {
+ return new ArcTypeCesiumWriter(this);
+ }
+
+ /**
+ *
+ Writes the value expressed as a {@code ArcType}, which is the arc type.
+
+
+
+ * @param value The style of an arc.
+ */
+ public final void writeArcType(@Nonnull CesiumArcType value) {
+ final String PropertyName = ArcTypePropertyName;
+ if (getForceInterval()) {
+ openIntervalIfNecessary();
+ }
+ if (getIsInterval()) {
+ getOutput().writePropertyName(PropertyName);
+ }
+ getOutput().writeValue(CesiumFormattingHelper.arcTypeToString(value));
+ }
+
+ /**
+ *
+ Writes the value expressed as a {@code reference}, which is the arc type specified as a reference to another property.
+
+
+
+ * @param value The reference.
+ */
+ public final void writeReference(Reference value) {
+ final String PropertyName = ReferencePropertyName;
+ openIntervalIfNecessary();
+ getOutput().writePropertyName(PropertyName);
+ CesiumWritingHelper.writeReference(getOutput(), value);
+ }
+
+ /**
+ *
+ Writes the value expressed as a {@code reference}, which is the arc type specified as a reference to another property.
+
+
+
+ * @param value The earliest date of the interval.
+ */
+ public final void writeReference(String value) {
+ final String PropertyName = ReferencePropertyName;
+ openIntervalIfNecessary();
+ getOutput().writePropertyName(PropertyName);
+ CesiumWritingHelper.writeReference(getOutput(), value);
+ }
+
+ /**
+ *
+ Writes the value expressed as a {@code reference}, which is the arc type specified as a reference to another property.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyName The property on the referenced object.
+ */
+ public final void writeReference(String identifier, String propertyName) {
+ final String PropertyName = ReferencePropertyName;
+ openIntervalIfNecessary();
+ getOutput().writePropertyName(PropertyName);
+ CesiumWritingHelper.writeReference(getOutput(), identifier, propertyName);
+ }
+
+ /**
+ *
+ Writes the value expressed as a {@code reference}, which is the arc type specified as a reference to another property.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyNames The hierarchy of properties to be indexed on the referenced object.
+ */
+ public final void writeReference(String identifier, String[] propertyNames) {
+ final String PropertyName = ReferencePropertyName;
+ openIntervalIfNecessary();
+ getOutput().writePropertyName(PropertyName);
+ CesiumWritingHelper.writeReference(getOutput(), identifier, propertyNames);
+ }
+
+ /**
+ *
+ Returns a wrapper for this instance that implements {@link ICesiumValuePropertyWriter} to write a value in {@code ArcType} format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both.
+
+
+
+ * @return The wrapper.
+ */
+ public final ICesiumValuePropertyWriter asArcType() {
+ return m_asArcType.getValue();
+ }
+
+ private final ICesiumValuePropertyWriter createArcTypeAdaptor() {
+ return new CesiumWriterAdaptor(this,
+ new CesiumWriterAdaptorWriteCallback() {
+ public void invoke(ArcTypeCesiumWriter me, @Nonnull CesiumArcType value) {
+ me.writeArcType(value);
+ }
+ });
+ }
+
+ /**
+ *
+ Returns a wrapper for this instance that implements {@link ICesiumValuePropertyWriter} to write a value in {@code Reference} format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both.
+
+
+
+ * @return The wrapper.
+ */
+ public final ICesiumValuePropertyWriter asReference() {
+ return m_asReference.getValue();
+ }
+
+ private final ICesiumValuePropertyWriter createReferenceAdaptor() {
+ return new CesiumWriterAdaptor(this,
+ new CesiumWriterAdaptorWriteCallback() {
+ public void invoke(ArcTypeCesiumWriter me, Reference value) {
+ me.writeReference(value);
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumArcType.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumArcType.java
new file mode 100644
index 00000000..c261b922
--- /dev/null
+++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumArcType.java
@@ -0,0 +1,82 @@
+package cesiumlanguagewriter;
+
+
+import agi.foundation.compatibility.*;
+import agi.foundation.compatibility.Enumeration;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ *
+ Specifies the type of an arc.
+
+
+ */
+@SuppressWarnings( {
+ "unused",
+ "deprecation",
+ "serial"
+})
+public enum CesiumArcType implements Enumeration {
+ /**
+ *
+ The arc is a straight line that does not conform to the surface of an ellipsoid.
+
+
+ */
+ NONE(0), /**
+ *
+ The arc is a geodesic, which is the shortest path conforming to the surface of an ellipsoid.
+
+
+ */
+ GEODESIC(1), /**
+ *
+ The arc is a rhumb line, or loxodrome, which is the path of constant heading conforming to the surface of an ellipsoid.
+
+
+ */
+ RHUMB(2);
+ private final int value;
+
+ CesiumArcType(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the numeric value associated with this enum constant.
+ * @return A numeric value.
+ */
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Get the enum constant that is associated with the given numeric value.
+ * @return The enum constant associated with value.
+ * @param value a numeric value.
+ */
+ @Nonnull
+ public static CesiumArcType getFromValue(int value) {
+ switch (value) {
+ case 0:
+ return NONE;
+ case 1:
+ return GEODESIC;
+ case 2:
+ return RHUMB;
+ default:
+ throw new IllegalArgumentException("Undefined enum value.");
+ }
+ }
+
+ /**
+ * Get the enum constant that is considered to be the default.
+ * @return The default enum constant.
+ */
+ @Nonnull
+ public static CesiumArcType getDefault() {
+ return NONE;
+ }
+}
\ No newline at end of file
diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolygonCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolygonCesiumWriter.java
index e194030a..0c706e74 100644
--- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolygonCesiumWriter.java
+++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolygonCesiumWriter.java
@@ -6,6 +6,7 @@
import agi.foundation.compatibility.Func1;
import agi.foundation.compatibility.Lazy;
import cesiumlanguagewriter.advanced.*;
+import cesiumlanguagewriter.ArcTypeCesiumWriter;
import cesiumlanguagewriter.BooleanCesiumWriter;
import cesiumlanguagewriter.ColorCesiumWriter;
import cesiumlanguagewriter.DistanceDisplayConditionCesiumWriter;
@@ -46,6 +47,13 @@ public class PolygonCesiumWriter extends CesiumPropertyWriter m_arcType = new Lazy(new Func1() {
+ public cesiumlanguagewriter.ArcTypeCesiumWriter invoke() {
+ return new ArcTypeCesiumWriter(ArcTypePropertyName);
+ }
+ }, false);
private Lazy m_height = new Lazy(new Func1() {
public cesiumlanguagewriter.DoubleCesiumWriter invoke() {
return new DoubleCesiumWriter(HeightPropertyName);
@@ -493,6 +506,127 @@ public final void writePositionsPropertyReferences(Iterable reference
}
}
+ /**
+ * Gets the writer for the {@code arcType} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code arcType} property defines the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+ */
+ @Nonnull
+ public final ArcTypeCesiumWriter getArcTypeWriter() {
+ return m_arcType.getValue();
+ }
+
+ /**
+ *
+ Opens and returns the writer for the {@code arcType} property. The {@code arcType} property defines the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+ */
+ @Nonnull
+ public final ArcTypeCesiumWriter openArcTypeProperty() {
+ openIntervalIfNecessary();
+ return this. openAndReturn(getArcTypeWriter());
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code ArcType} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The style of an arc.
+ */
+ public final void writeArcTypeProperty(@Nonnull CesiumArcType value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeArcType(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The reference.
+ */
+ public final void writeArcTypePropertyReference(Reference value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The earliest date of the interval.
+ */
+ public final void writeArcTypePropertyReference(String value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyName The property on the referenced object.
+ */
+ public final void writeArcTypePropertyReference(String identifier, String propertyName) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(identifier, propertyName);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polygon. If not specified, the default value is GEODESIC.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyNames The hierarchy of properties to be indexed on the referenced object.
+ */
+ public final void writeArcTypePropertyReference(String identifier, String[] propertyNames) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(identifier, propertyNames);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
/**
* Gets the writer for the {@code height} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code height} property defines the height of the polygon when {@code perPositionHeight} is false. If not specified, the default value is 0.0.
diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java
index 1c3856fa..f7cb69de 100644
--- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java
+++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java
@@ -6,6 +6,7 @@
import agi.foundation.compatibility.Func1;
import agi.foundation.compatibility.Lazy;
import cesiumlanguagewriter.advanced.*;
+import cesiumlanguagewriter.ArcTypeCesiumWriter;
import cesiumlanguagewriter.BooleanCesiumWriter;
import cesiumlanguagewriter.DistanceDisplayConditionCesiumWriter;
import cesiumlanguagewriter.DoubleCesiumWriter;
@@ -44,6 +45,13 @@ public class PolylineCesiumWriter extends CesiumPropertyWriter m_arcType = new Lazy(new Func1() {
+ public cesiumlanguagewriter.ArcTypeCesiumWriter invoke() {
+ return new ArcTypeCesiumWriter(ArcTypePropertyName);
+ }
+ }, false);
private Lazy m_width = new Lazy(new Func1() {
public cesiumlanguagewriter.DoubleCesiumWriter invoke() {
return new DoubleCesiumWriter(WidthPropertyName);
@@ -419,6 +432,127 @@ public final void writePositionsPropertyReferences(Iterable reference
}
}
+ /**
+ * Gets the writer for the {@code arcType} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code arcType} property defines the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+ */
+ @Nonnull
+ public final ArcTypeCesiumWriter getArcTypeWriter() {
+ return m_arcType.getValue();
+ }
+
+ /**
+ *
+ Opens and returns the writer for the {@code arcType} property. The {@code arcType} property defines the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+ */
+ @Nonnull
+ public final ArcTypeCesiumWriter openArcTypeProperty() {
+ openIntervalIfNecessary();
+ return this. openAndReturn(getArcTypeWriter());
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code ArcType} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The style of an arc.
+ */
+ public final void writeArcTypeProperty(@Nonnull CesiumArcType value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeArcType(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The reference.
+ */
+ public final void writeArcTypePropertyReference(Reference value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+
+ * @param value The earliest date of the interval.
+ */
+ public final void writeArcTypePropertyReference(String value) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(value);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyName The property on the referenced object.
+ */
+ public final void writeArcTypePropertyReference(String identifier, String propertyName) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(identifier, propertyName);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
+ /**
+ *
+ Writes a value for the {@code arcType} property as a {@code reference} value. The {@code arcType} property specifies the type of arc that should connect the positions of the polyline. If not specified, the default value is GEODESIC.
+
+
+
+
+ * @param identifier The identifier of the object which contains the referenced property.
+ * @param propertyNames The hierarchy of properties to be indexed on the referenced object.
+ */
+ public final void writeArcTypePropertyReference(String identifier, String[] propertyNames) {
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter writer = openArcTypeProperty();
+ try {
+ writer.writeReference(identifier, propertyNames);
+ } finally {
+ DisposeHelper.dispose(writer);
+ }
+ }
+ }
+
/**
* Gets the writer for the {@code width} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code width} property defines the width of the polyline. If not specified, the default value is 1.0.
@@ -776,7 +910,7 @@ public final PolylineMaterialCesiumWriter openMaterialProperty() {
}
/**
- * Gets the writer for the {@code followSurface} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code followSurface} property defines whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ * Gets the writer for the {@code followSurface} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The {@code followSurface} property defines whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
*/
@@ -787,7 +921,7 @@ public final BooleanCesiumWriter getFollowSurfaceWriter() {
/**
*
- Opens and returns the writer for the {@code followSurface} property. The {@code followSurface} property defines whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Opens and returns the writer for the {@code followSurface} property. The {@code followSurface} property defines whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
*/
@@ -799,7 +933,7 @@ public final BooleanCesiumWriter openFollowSurfaceProperty() {
/**
*
- Writes a value for the {@code followSurface} property as a {@code boolean} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Writes a value for the {@code followSurface} property as a {@code boolean} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
@@ -818,7 +952,7 @@ public final void writeFollowSurfaceProperty(boolean value) {
/**
*
- Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
@@ -837,7 +971,7 @@ public final void writeFollowSurfacePropertyReference(Reference value) {
/**
*
- Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
@@ -856,7 +990,7 @@ public final void writeFollowSurfacePropertyReference(String value) {
/**
*
- Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
@@ -877,7 +1011,7 @@ public final void writeFollowSurfacePropertyReference(String identifier, String
/**
*
- Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. If not specified, the default value is {@code true}.
+ Writes a value for the {@code followSurface} property as a {@code reference} value. The {@code followSurface} property specifies whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead. If not specified, the default value is {@code true}.
diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java
index 816d4d45..aa7f5477 100644
--- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java
+++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java
@@ -569,6 +569,34 @@ public static String labelStyleToString(@Nonnull CesiumLabelStyle value) {
}
}
+ /**
+ *
+ Converts a {@link CesiumArcType} to the corresponding string in a CZML stream.
+
+
+
+
+ * @param value The value to convert.
+ * @return The string representing the specified value.
+ */
+ @Nonnull
+ public static String arcTypeToString(@Nonnull CesiumArcType value) {
+ switch (value) {
+ case NONE: {
+ return "NONE";
+ }
+ case GEODESIC: {
+ return "GEODESIC";
+ }
+ case RHUMB: {
+ return "RHUMB";
+ }
+ default: {
+ throw new ArgumentException(CesiumLocalization.getUnknownEnumerationValue(), "value");
+ }
+ }
+ }
+
/**
*
Converts a {@link CesiumCornerType} to the corresponding string in a CZML stream.
diff --git a/Java/CesiumLanguageWriterTests/translatedSrc/cesiumlanguagewritertests/TestGenerateValidationDocument.java b/Java/CesiumLanguageWriterTests/translatedSrc/cesiumlanguagewritertests/TestGenerateValidationDocument.java
index c192a29d..ef43d659 100644
--- a/Java/CesiumLanguageWriterTests/translatedSrc/cesiumlanguagewritertests/TestGenerateValidationDocument.java
+++ b/Java/CesiumLanguageWriterTests/translatedSrc/cesiumlanguagewritertests/TestGenerateValidationDocument.java
@@ -1647,6 +1647,15 @@ private final void writeConstantValues() {
DisposeHelper.dispose(w2);
}
}
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter w2 = w.openArcTypeProperty();
+ try {
+ w2.writeArcType(CesiumArcType.RHUMB);
+ TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polygon.arcType.getValue(date)).toEqual(ArcType.RHUMB);");
+ } finally {
+ DisposeHelper.dispose(w2);
+ }
+ }
{
cesiumlanguagewriter.DoubleCesiumWriter w2 = w.openHeightProperty();
try {
@@ -1822,6 +1831,15 @@ private final void writeConstantValues() {
DisposeHelper.dispose(w2);
}
}
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter w2 = w.openArcTypeProperty();
+ try {
+ w2.writeArcType(CesiumArcType.RHUMB);
+ TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polyline.arcType.getValue(date)).toEqual(ArcType.RHUMB);");
+ } finally {
+ DisposeHelper.dispose(w2);
+ }
+ }
{
cesiumlanguagewriter.DoubleCesiumWriter w2 = w.openWidthProperty();
try {
@@ -1863,15 +1881,6 @@ private final void writeConstantValues() {
DisposeHelper.dispose(w2);
}
}
- {
- cesiumlanguagewriter.BooleanCesiumWriter w2 = w.openFollowSurfaceProperty();
- try {
- w2.writeBoolean(true);
- TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polyline.followSurface.getValue(date)).toEqual(true);");
- } finally {
- DisposeHelper.dispose(w2);
- }
- }
{
cesiumlanguagewriter.ShadowModeCesiumWriter w2 = w.openShadowsProperty();
try {
@@ -19400,6 +19409,15 @@ private final void writeReferenceValues() {
DisposeHelper.dispose(w2);
}
}
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter w2 = w.openArcTypeProperty();
+ try {
+ w2.writeReference(new Reference("Constant", TestGenerateValidationDocument. createList("polygon", "arcType")));
+ TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polygon.arcType.getValue(date)).toEqual(constant.polygon.arcType.getValue(date));");
+ } finally {
+ DisposeHelper.dispose(w2);
+ }
+ }
{
cesiumlanguagewriter.DoubleCesiumWriter w2 = w.openHeightProperty();
try {
@@ -19580,6 +19598,15 @@ private final void writeReferenceValues() {
DisposeHelper.dispose(w2);
}
}
+ {
+ cesiumlanguagewriter.ArcTypeCesiumWriter w2 = w.openArcTypeProperty();
+ try {
+ w2.writeReference(new Reference("Constant", TestGenerateValidationDocument. createList("polyline", "arcType")));
+ TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polyline.arcType.getValue(date)).toEqual(constant.polyline.arcType.getValue(date));");
+ } finally {
+ DisposeHelper.dispose(w2);
+ }
+ }
{
cesiumlanguagewriter.DoubleCesiumWriter w2 = w.openWidthProperty();
try {
@@ -19622,15 +19649,6 @@ private final void writeReferenceValues() {
DisposeHelper.dispose(w2);
}
}
- {
- cesiumlanguagewriter.BooleanCesiumWriter w2 = w.openFollowSurfaceProperty();
- try {
- w2.writeReference(new Reference("Constant", TestGenerateValidationDocument. createList("polyline", "followSurface")));
- TextWriterHelper.writeLine(m_assertionsWriter, " expect(e.polyline.followSurface.getValue(date)).toEqual(constant.polyline.followSurface.getValue(date));");
- } finally {
- DisposeHelper.dispose(w2);
- }
- }
{
cesiumlanguagewriter.ShadowModeCesiumWriter w2 = w.openShadowsProperty();
try {
diff --git a/Schema/ArcType.json b/Schema/ArcType.json
new file mode 100644
index 00000000..4a48573f
--- /dev/null
+++ b/Schema/ArcType.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "https://analyticalgraphicsinc.github.io/czml-writer/Schema/ArcType.json",
+ "title": "ArcType",
+ "description": "The type of an arc.",
+ "type": [
+ "array",
+ "object",
+ "string"
+ ],
+ "items": {
+ "$ref": "#"
+ },
+ "properties": {
+ "ArcType": {
+ "$ref": "ArcTypeValue.json",
+ "description": "The arc type.",
+ "czmlValue": true
+ },
+ "reference": {
+ "$ref": "ReferenceValue.json",
+ "description": "The arc type specified as a reference to another property.",
+ "czmlValue": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/Schema/ArcTypeValue.json b/Schema/ArcTypeValue.json
new file mode 100644
index 00000000..e4330ba6
--- /dev/null
+++ b/Schema/ArcTypeValue.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "https://analyticalgraphicsinc.github.io/czml-writer/Schema/ArcTypeValue.json",
+ "title": "ArcType",
+ "description": "The type of an arc.",
+ "type": "string",
+ "oneOf": [
+ {
+ "enum": [
+ "NONE"
+ ],
+ "description": "The arc is a straight line that does not conform to the surface of an ellipsoid."
+ },
+ {
+ "enum": [
+ "GEODESIC"
+ ],
+ "description": "The arc is a geodesic, which is the shortest path conforming to the surface of an ellipsoid."
+ },
+ {
+ "enum": [
+ "RHUMB"
+ ],
+ "description": "The arc is a rhumb line, or loxodrome, which is the path of constant heading conforming to the surface of an ellipsoid."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Schema/Polygon.json b/Schema/Polygon.json
index df366260..13f910b8 100644
--- a/Schema/Polygon.json
+++ b/Schema/Polygon.json
@@ -20,6 +20,11 @@
"$ref": "PositionList.json",
"description": "The array of positions defining a simple polygon."
},
+ "arcType": {
+ "$ref": "ArcType.json",
+ "description": "The type of arc that should connect the positions of the polygon.",
+ "default": "GEODESIC"
+ },
"height": {
"$ref": "Double.json",
"description": "The height of the polygon when `perPositionHeight` is false.",
diff --git a/Schema/Polyline.json b/Schema/Polyline.json
index fd1f6589..07f81f80 100644
--- a/Schema/Polyline.json
+++ b/Schema/Polyline.json
@@ -20,6 +20,11 @@
"$ref": "PositionList.json",
"description": "The array of positions defining the polyline as a line strip."
},
+ "arcType": {
+ "$ref": "ArcType.json",
+ "description": "The type of arc that should connect the positions of the polyline.",
+ "default": "GEODESIC"
+ },
"width": {
"$ref": "Double.json",
"description": "The width of the polyline.",
@@ -37,7 +42,7 @@
},
"followSurface": {
"$ref": "Boolean.json",
- "description": "Whether or not the positions are connected as great arcs (the default) or as straight lines.",
+ "description": "Whether or not the positions are connected as great arcs (the default) or as straight lines. This property has been superseded by arcType, which should be used instead.",
"default": true
},
"shadows": {