Exemplo n.º 1
0
        public TerrainPyramid(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            //<PyramidLevelStatus>1</PyramidLevelStatus> 
            XPathNavigator navigatorPyramidLevelStatus = navigator.SelectSingleNode("PyramidLevelStatus");
            if (navigatorPyramidLevelStatus != null) {
                this._pyramidLevelStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), navigatorPyramidLevelStatus.Value, true);
            }

            //<PointCount>-1</PointCount> 
            XPathNavigator navigatorPointCount = navigator.SelectSingleNode("PointCount");
            if (navigatorPointCount != null) {
                this._pointCount = navigatorPointCount.ValueAsInt;
            }

            //<MaxScale>1000</MaxScale> 
            XPathNavigator navigatorMaxScale = navigator.SelectSingleNode("MaxScale");
            if (navigatorMaxScale != null) {
                this._maxScale = navigatorMaxScale.ValueAsInt;
            }

            //<Resolution>2</Resolution> 
            XPathNavigator navigatorSourceStatus = navigator.SelectSingleNode("Resolution");
            if (navigatorSourceStatus != null) {
                this._resolution = navigatorSourceStatus.ValueAsDouble;
            }
        }
 public TerrainPyramid(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._pyramidLevelStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), info.GetString("pyramidLevelStatus"), true);
     this._pointCount         = info.GetInt32("pointCount");
     this._maxScale           = info.GetInt32("maxScale");
     this._resolution         = info.GetDouble("resolution");
 }
 public TerrainPyramid(TerrainPyramid prototype) : base(prototype)
 {
     this._pyramidLevelStatus = prototype.PyramidLevelStatus;
     this._pointCount         = prototype.PointCount;
     this._maxScale           = prototype.MaxScale;
     this._resolution         = prototype.Resolution;
 }
Exemplo n.º 4
0
 public TerrainDataSource(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._featureClassID       = info.GetInt32("featureClassID");
     this._featureClassName     = info.GetString("featureClassName");
     this._groupID              = info.GetInt32("groupID");
     this._sourceStatus         = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus?), info.GetString("sourceStatus"), true);
     this._sourceType           = (TerrainDataSourceType)Enum.Parse(typeof(TerrainDataSourceType?), info.GetString("sourceType"), true);
     this._surfaceFeatureType   = (esriTinSurfaceType)Enum.Parse(typeof(esriTinSurfaceType?), info.GetString("surfaceFeatureType"), true);
     this._isBase               = info.GetBoolean("isBase");
     this._anchored             = info.GetBoolean("anchored");
     this._applyToOverview      = info.GetBoolean("applyToOverview");
     this._autoGeneralize       = info.GetBoolean("autoGeneralize");
     this._resolutionLowerBound = info.GetDouble("resolutionLowerBound");
     this._resolutionUpperBound = info.GetDouble("resolutionUpperBound");
     this._sourceName           = info.GetString("sourceName");
     this._heightField          = info.GetString("heightField");
     this._tagValueField        = info.GetString("tagValueField");
     this._reservedFields       = (List <string>)info.GetValue("reservedFields", typeof(List <string>));
 }
Exemplo n.º 5
0
 public TerrainDataSource(TerrainDataSource prototype) : base(prototype)
 {
     this._featureClassID       = prototype.FeatureClassID;
     this._featureClassName     = prototype.FeatureClassName;
     this._groupID              = prototype.GroupID;
     this._sourceStatus         = prototype.SourceStatus;
     this._sourceType           = prototype.SourceType;
     this._surfaceFeatureType   = prototype.SurfaceFeatureType;
     this._isBase               = prototype.IsBase;
     this._anchored             = prototype.Anchored;
     this._applyToOverview      = prototype.ApplyToOverview;
     this._autoGeneralize       = prototype.AutoGeneralize;
     this._resolutionLowerBound = prototype.ResolutionLowerBound;
     this._resolutionUpperBound = prototype.ResolutionUpperBound;
     this._sourceName           = prototype.SourceName;
     this._heightField          = prototype.HeightField;
     this._tagValueField        = prototype.TagValueField;
     this._reservedFields       = new List <string>();
     foreach (string reservedField in prototype.ReservedFields)
     {
         this._reservedFields.Add(reservedField);
     }
 }
        public TerrainPyramid(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            //<PyramidLevelStatus>1</PyramidLevelStatus>
            XPathNavigator navigatorPyramidLevelStatus = navigator.SelectSingleNode("PyramidLevelStatus");

            if (navigatorPyramidLevelStatus != null)
            {
                this._pyramidLevelStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), navigatorPyramidLevelStatus.Value, true);
            }

            //<PointCount>-1</PointCount>
            XPathNavigator navigatorPointCount = navigator.SelectSingleNode("PointCount");

            if (navigatorPointCount != null)
            {
                this._pointCount = navigatorPointCount.ValueAsInt;
            }

            //<MaxScale>1000</MaxScale>
            XPathNavigator navigatorMaxScale = navigator.SelectSingleNode("MaxScale");

            if (navigatorMaxScale != null)
            {
                this._maxScale = navigatorMaxScale.ValueAsInt;
            }

            //<Resolution>2</Resolution>
            XPathNavigator navigatorSourceStatus = navigator.SelectSingleNode("Resolution");

            if (navigatorSourceStatus != null)
            {
                this._resolution = navigatorSourceStatus.ValueAsDouble;
            }
        }
Exemplo n.º 7
0
 public TerrainPyramid(TerrainPyramid prototype) : base(prototype) {
     this._pyramidLevelStatus = prototype.PyramidLevelStatus;
     this._pointCount = prototype.PointCount;
     this._maxScale = prototype.MaxScale;
     this._resolution = prototype.Resolution;
 }
Exemplo n.º 8
0
 public TerrainPyramid(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._pyramidLevelStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), info.GetString("pyramidLevelStatus"), true);
     this._pointCount = info.GetInt32("pointCount");
     this._maxScale = info.GetInt32("maxScale");
     this._resolution = info.GetDouble("resolution");
 }
        public TerrainDataSource(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            //<FeatureClassID>5</FeatureClassID> 
            XPathNavigator navigatorFeatureClassID = navigator.SelectSingleNode("FeatureClassID");
            if (navigatorFeatureClassID != null) {
                this._featureClassID = navigatorFeatureClassID.ValueAsInt;
            }

            //<FeatureClassName>topo_clip_poly</FeatureClassName> 
            XPathNavigator navigatorFeatureClassName = navigator.SelectSingleNode("FeatureClassName");
            if (navigatorFeatureClassName != null) {
                this._featureClassName = navigatorFeatureClassName.Value;
            }

            //<GroupID>1</GroupID> 
            XPathNavigator navigatorGroupID = navigator.SelectSingleNode("GroupID");
            if (navigatorGroupID != null) {
                this._groupID = navigatorGroupID.ValueAsInt;
            }

            //<SourceStatus>1</SourceStatus> 
            XPathNavigator navigatorSourceStatus = navigator.SelectSingleNode("SourceStatus");
            if (navigatorSourceStatus != null) {
                this._sourceStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), navigatorSourceStatus.Value, true);
            }

            //<SourceType>0</SourceType> 
            XPathNavigator navigatorSourceType = navigator.SelectSingleNode("SourceType");
            if (navigatorSourceType != null) {
                this._sourceType = (TerrainDataSourceType)Enum.Parse(typeof(TerrainDataSourceType), navigatorSourceType.Value, true);
            }

            //<SurfaceFeatureType>18</SurfaceFeatureType> 
            XPathNavigator navigatorSurfaceFeatureType = navigator.SelectSingleNode("SurfaceFeatureType");
            if (navigatorSurfaceFeatureType != null) {
                this._surfaceFeatureType = (esriTinSurfaceType)Enum.Parse(typeof(esriTinSurfaceType), navigatorSurfaceFeatureType.Value, true);
            }

            //<IsBase>false</IsBase> 
            XPathNavigator navigatorIsBase = navigator.SelectSingleNode("IsBase");
            if (navigatorIsBase != null) {
                this._isBase = navigatorIsBase.ValueAsBoolean;
            }

            //<Anchored>false</Anchored> 
            XPathNavigator navigatorAnchored = navigator.SelectSingleNode("Anchored");
            if (navigatorAnchored != null) {
                this._anchored = navigatorAnchored.ValueAsBoolean;
            }

            //<ApplyToOverview>true</ApplyToOverview> 
            XPathNavigator navigatorApplyToOverview = navigator.SelectSingleNode("ApplyToOverview");
            if (navigatorApplyToOverview != null) {
                this._applyToOverview = navigatorApplyToOverview.ValueAsBoolean;
            }

            //<AutoGeneralize>false</AutoGeneralize> 
            XPathNavigator navigatorAutoGeneralize = navigator.SelectSingleNode("AutoGeneralize");
            if (navigatorAutoGeneralize != null) {
                this._autoGeneralize = navigatorAutoGeneralize.ValueAsBoolean;
            }

            //<ResolutionLowerBound>0</ResolutionLowerBound> 
            XPathNavigator navigatorResolutionLowerBound = navigator.SelectSingleNode("ResolutionLowerBound");
            if (navigatorResolutionLowerBound != null) {
                this._resolutionLowerBound = navigatorResolutionLowerBound.ValueAsInt;
            }

            //<ResolutionUpperBound>32</ResolutionUpperBound> 
            XPathNavigator navigatorResolutionUpperBound = navigator.SelectSingleNode("ResolutionUpperBound");
            if (navigatorResolutionUpperBound != null) {
                this._resolutionUpperBound = navigatorResolutionUpperBound.ValueAsInt;
            }

            //<SourceName /> 
            XPathNavigator navigatorSourceName = navigator.SelectSingleNode("SourceName");
            if (navigatorSourceName != null) {
                this._sourceName = navigatorSourceName.Value;
            }

            //<HeightField /> 
            XPathNavigator navigatorHeightField = navigator.SelectSingleNode("HeightField");
            if (navigatorHeightField != null) {
                this._heightField = navigatorHeightField.Value;
            }

            //<TagValueField /> 
            XPathNavigator navigatorTagValueField = navigator.SelectSingleNode("TagValueField");
            if (navigatorTagValueField != null) {
                this._tagValueField = navigatorTagValueField.Value;
            }

            // <ReservedFields xsi:type="esri:ArrayOfString" />
            // TODO Verify TerrainDataSource::ReservedFields
            this._reservedFields = new List<string>();
            XPathNodeIterator interatorReservedField = navigator.Select("ReservedFields/String");
            while (interatorReservedField.MoveNext()) {
                // Get <Property>
                XPathNavigator navigatorReservedField = interatorReservedField.Current;

                // Add Property
                this._reservedFields.Add(navigatorReservedField.Value);
            }
        }
 public TerrainDataSource(TerrainDataSource prototype) : base(prototype) {
     this._featureClassID = prototype.FeatureClassID;
     this._featureClassName = prototype.FeatureClassName;
     this._groupID = prototype.GroupID;
     this._sourceStatus = prototype.SourceStatus;
     this._sourceType = prototype.SourceType;
     this._surfaceFeatureType = prototype.SurfaceFeatureType;
     this._isBase = prototype.IsBase;
     this._anchored = prototype.Anchored;
     this._applyToOverview = prototype.ApplyToOverview;
     this._autoGeneralize = prototype.AutoGeneralize;
     this._resolutionLowerBound = prototype.ResolutionLowerBound;
     this._resolutionUpperBound = prototype.ResolutionUpperBound;
     this._sourceName = prototype.SourceName;
     this._heightField = prototype.HeightField;
     this._tagValueField = prototype.TagValueField;
     this._reservedFields = new List<string>();
     foreach (string reservedField in prototype.ReservedFields) {
         this._reservedFields.Add(reservedField);
     }
 }
 public TerrainDataSource(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._featureClassID = info.GetInt32("featureClassID");
     this._featureClassName = info.GetString("featureClassName");
     this._groupID = info.GetInt32("groupID");
     this._sourceStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus?), info.GetString("sourceStatus"), true);
     this._sourceType = (TerrainDataSourceType)Enum.Parse(typeof(TerrainDataSourceType?), info.GetString("sourceType"), true);
     this._surfaceFeatureType = (esriTinSurfaceType)Enum.Parse(typeof(esriTinSurfaceType?), info.GetString("surfaceFeatureType"), true);
     this._isBase = info.GetBoolean("isBase");
     this._anchored = info.GetBoolean("anchored");
     this._applyToOverview = info.GetBoolean("applyToOverview");
     this._autoGeneralize = info.GetBoolean("autoGeneralize");
     this._resolutionLowerBound = info.GetDouble("resolutionLowerBound");
     this._resolutionUpperBound = info.GetDouble("resolutionUpperBound");
     this._sourceName = info.GetString("sourceName");
     this._heightField = info.GetString("heightField");
     this._tagValueField = info.GetString("tagValueField");
     this._reservedFields = (List<string>)info.GetValue("reservedFields", typeof(List<string>));
 }
Exemplo n.º 12
0
        public TerrainDataSource(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            //<FeatureClassID>5</FeatureClassID>
            XPathNavigator navigatorFeatureClassID = navigator.SelectSingleNode("FeatureClassID");

            if (navigatorFeatureClassID != null)
            {
                this._featureClassID = navigatorFeatureClassID.ValueAsInt;
            }

            //<FeatureClassName>topo_clip_poly</FeatureClassName>
            XPathNavigator navigatorFeatureClassName = navigator.SelectSingleNode("FeatureClassName");

            if (navigatorFeatureClassName != null)
            {
                this._featureClassName = navigatorFeatureClassName.Value;
            }

            //<GroupID>1</GroupID>
            XPathNavigator navigatorGroupID = navigator.SelectSingleNode("GroupID");

            if (navigatorGroupID != null)
            {
                this._groupID = navigatorGroupID.ValueAsInt;
            }

            //<SourceStatus>1</SourceStatus>
            XPathNavigator navigatorSourceStatus = navigator.SelectSingleNode("SourceStatus");

            if (navigatorSourceStatus != null)
            {
                this._sourceStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), navigatorSourceStatus.Value, true);
            }

            //<SourceType>0</SourceType>
            XPathNavigator navigatorSourceType = navigator.SelectSingleNode("SourceType");

            if (navigatorSourceType != null)
            {
                this._sourceType = (TerrainDataSourceType)Enum.Parse(typeof(TerrainDataSourceType), navigatorSourceType.Value, true);
            }

            //<SurfaceFeatureType>18</SurfaceFeatureType>
            XPathNavigator navigatorSurfaceFeatureType = navigator.SelectSingleNode("SurfaceFeatureType");

            if (navigatorSurfaceFeatureType != null)
            {
                this._surfaceFeatureType = (esriTinSurfaceType)Enum.Parse(typeof(esriTinSurfaceType), navigatorSurfaceFeatureType.Value, true);
            }

            //<IsBase>false</IsBase>
            XPathNavigator navigatorIsBase = navigator.SelectSingleNode("IsBase");

            if (navigatorIsBase != null)
            {
                this._isBase = navigatorIsBase.ValueAsBoolean;
            }

            //<Anchored>false</Anchored>
            XPathNavigator navigatorAnchored = navigator.SelectSingleNode("Anchored");

            if (navigatorAnchored != null)
            {
                this._anchored = navigatorAnchored.ValueAsBoolean;
            }

            //<ApplyToOverview>true</ApplyToOverview>
            XPathNavigator navigatorApplyToOverview = navigator.SelectSingleNode("ApplyToOverview");

            if (navigatorApplyToOverview != null)
            {
                this._applyToOverview = navigatorApplyToOverview.ValueAsBoolean;
            }

            //<AutoGeneralize>false</AutoGeneralize>
            XPathNavigator navigatorAutoGeneralize = navigator.SelectSingleNode("AutoGeneralize");

            if (navigatorAutoGeneralize != null)
            {
                this._autoGeneralize = navigatorAutoGeneralize.ValueAsBoolean;
            }

            //<ResolutionLowerBound>0</ResolutionLowerBound>
            XPathNavigator navigatorResolutionLowerBound = navigator.SelectSingleNode("ResolutionLowerBound");

            if (navigatorResolutionLowerBound != null)
            {
                this._resolutionLowerBound = navigatorResolutionLowerBound.ValueAsInt;
            }

            //<ResolutionUpperBound>32</ResolutionUpperBound>
            XPathNavigator navigatorResolutionUpperBound = navigator.SelectSingleNode("ResolutionUpperBound");

            if (navigatorResolutionUpperBound != null)
            {
                this._resolutionUpperBound = navigatorResolutionUpperBound.ValueAsInt;
            }

            //<SourceName />
            XPathNavigator navigatorSourceName = navigator.SelectSingleNode("SourceName");

            if (navigatorSourceName != null)
            {
                this._sourceName = navigatorSourceName.Value;
            }

            //<HeightField />
            XPathNavigator navigatorHeightField = navigator.SelectSingleNode("HeightField");

            if (navigatorHeightField != null)
            {
                this._heightField = navigatorHeightField.Value;
            }

            //<TagValueField />
            XPathNavigator navigatorTagValueField = navigator.SelectSingleNode("TagValueField");

            if (navigatorTagValueField != null)
            {
                this._tagValueField = navigatorTagValueField.Value;
            }

            // <ReservedFields xsi:type="esri:ArrayOfString" />
            // TODO Verify TerrainDataSource::ReservedFields
            this._reservedFields = new List <string>();
            XPathNodeIterator interatorReservedField = navigator.Select("ReservedFields/String");

            while (interatorReservedField.MoveNext())
            {
                // Get <Property>
                XPathNavigator navigatorReservedField = interatorReservedField.Current;

                // Add Property
                this._reservedFields.Add(navigatorReservedField.Value);
            }
        }