public FeatureDataset(FeatureDataset prototype) : base(prototype) {
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
        //
        // CONSTRUCTOR
        //
        public RasterDataset(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            this._spatialReference = new SpatialReference(navigatorSpatialReference);
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }

            // <Format>
            XPathNavigator navigatorFormat = navigator.SelectSingleNode("Format");
            if (navigatorFormat != null) {
                this._format = navigatorFormat.Value;
            }

            // <CompressionType>
            XPathNavigator navigatorCompressionType = navigator.SelectSingleNode("CompressionType");
            if (navigatorCompressionType != null) {
                this._compressionType = navigatorCompressionType.Value;
            }

            // <SensorType>
            XPathNavigator navigatorSensorType = navigator.SelectSingleNode("SensorType");
            if (navigatorSensorType != null) {
                this._sensorType = navigatorSensorType.Value;
            }

            // <Permanent>
            XPathNavigator navigatorPermanent = navigator.SelectSingleNode("Permanent");
            if (navigatorPermanent != null) {
                this._permanent = navigatorPermanent.ValueAsBoolean;
            }

            // <StorageDef>
            XPathNavigator navigatorStorageDef = navigator.SelectSingleNode("StorageDef");
            if (navigatorStorageDef != null) {
                this._storageDef = new StorageDef(navigatorStorageDef);
            }
            else {
                this._storageDef = new StorageDef();
            }
        }
Example #3
0
        //
        // CONSTRUCTOR
        //
        public Topology(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Extent></Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode(Xml.EXTENT);
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode(Xml.SPATIALREFERENCE);
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }

            // <ClusterTolerance></ClusterTolerance>
            XPathNavigator navigatorClusterTolerance = navigator.SelectSingleNode(Xml.CLUSTERTOLERANCE);
            if (navigatorClusterTolerance != null) {
                this._clusterTolerance = navigatorClusterTolerance.ValueAsDouble;
            }

            // <ZClusterTolerance></ZClusterTolerance>
            XPathNavigator navigatorZClusterTolerance = navigator.SelectSingleNode(Xml.ZCLUSTERTOLERANCE);
            if (navigatorZClusterTolerance != null) {
                this._zClusterTolerance = navigatorZClusterTolerance.ValueAsDouble;
            }

            // <MaxGeneratedErrorCount></MaxGeneratedErrorCount>
            XPathNavigator navigatorMaxGeneratedErrorCount = navigator.SelectSingleNode(Xml.MAXGENERATEDERRORCOUNT);
            if (navigatorMaxGeneratedErrorCount != null) {
                this._maxGeneratedErrorCount = navigatorMaxGeneratedErrorCount.ValueAsInt;
            }

            // <TopologyRules><TopologyRule></TopologyRule></TopologyRules>
            this._topologyRules = new List<TopologyRule>();
            XPathNodeIterator interatorTopologyRule = navigator.Select(string.Format("{0}/{1}", Xml.TOPOLOGYRULES, Xml.TOPOLOGYRULE));
            while (interatorTopologyRule.MoveNext()) {
                // Get <TopologyRule>
                XPathNavigator navigatorTopologyRule = interatorTopologyRule.Current;

                // Add Topology Rule
                TopologyRule topologyRule = new TopologyRule(navigatorTopologyRule);
                this._topologyRules.Add(topologyRule);
            }
        }
        //
        // CONSTRUCTOR
        //
        public FeatureDataset(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // Extent
            XPathNavigator navigatorExtent = navigator.SelectSingleNode(Xml.EXTENT);
            this._extent = new Extent(navigatorExtent);

            // Spatial Reference
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode(Xml.SPATIALREFERENCE);
            if (navigatorSpatialReference == null) {
                this._spatialReference = new SpatialReference();
            }
            else {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
        }
        public GeometricNetwork(GeometricNetwork prototype) : base(prototype) {
            if (prototype.Extent != null) {
                this._extent = prototype.Extent.Clone() as Extent;
            }
            if (prototype.SpatialReference != null) {
                this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
            }
            this._networkType = prototype.NetworkType;
            this._orphanJunctionFeatureClassName = prototype.OrphanJunctionFeatureClassName;

            // Add Cloned Rules
            this._connectivityRules = new List<ConnectivityRule>();
            foreach (ConnectivityRule connnectivityRule in prototype.ConnectivityRules) {
                this._connectivityRules.Add((ConnectivityRule)connnectivityRule.Clone());
            }

            // Add Cloned Network Weights
            this._netWeights = new List<NetWeight>();
            foreach (NetWeight netWeight in prototype.NetworkWeights) {
                this._netWeights.Add((NetWeight)netWeight.Clone());
            }

            // Add Cloned Network Weight Associations
            this._netWeightAssociations = new List<NetWeightAssociation>();
            foreach(NetWeightAssociation netWeightAssociation in prototype.NetworkWeightAssociations){
                this._netWeightAssociations.Add((NetWeightAssociation)netWeightAssociation.Clone());
            }
        }
 public GeometricNetwork(SerializationInfo info, StreamingContext context): base(info, context) {
     this._extent = (Extent)info.GetValue(GeometricNetwork.EXTENT_, typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue(GeometricNetwork.SPATIALREFERENCE_, typeof(SpatialReference));
     this._networkType = (esriNetworkType)Enum.Parse(typeof(esriNetworkType), info.GetString(GeometricNetwork.NETWORKTYPE_), true);
     this._orphanJunctionFeatureClassName = info.GetString(GeometricNetwork.ORPHANJUNCTIONFEATURECLASSNAME_);
     this._connectivityRules = (List<ConnectivityRule>)info.GetValue(GeometricNetwork.CONNECTIVITYRULES_, typeof(List<ConnectivityRule>));
     this._netWeights = (List<NetWeight>)info.GetValue(GeometricNetwork.NETWEIGHTS_, typeof(List<NetWeight>));
     this._netWeightAssociations = (List<NetWeightAssociation>)info.GetValue(GeometricNetwork.NETWEIGHTASSOCIATIONS_, typeof(List<NetWeightAssociation>));
 }
 public RasterBand(RasterBand prototype) : base(prototype) {
     this._oidFieldName = prototype.OidFieldName;
     this._isInteger = prototype.IsInteger;
     this._meanCellHeight = prototype.MeanCellHeight;
     this._meanCellWidth = prototype.MeanCellWidth;
     this._height = prototype.Height2;
     this._width = prototype.Width2;
     this._pixelType = prototype.PixelType;
     this._primaryField = prototype.PrimaryField;
     this._tableType = prototype.TableType;
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
Example #8
0
 public Terrain(Terrain prototype) : base(prototype) {
     this._configurationKeyword = prototype.ConfigurationKeyword;
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._pyramidType = prototype.PyramidType;
     this._windowSizeMethod = prototype.WindowSizeMethod;
     this._windowSizeZThreshold = prototype.WindowSizeZThreshold;
     this._windowSizeZThresholdStrategy = prototype.WindowSizeZThresholdStrategy;
     this._tileSize = prototype.TileSize;
     this._maxShapeSize = prototype.MaxShapeSize;
     this._maxOverviewSize = prototype.MaxOverviewSize;
     if (prototype.ExtentDomain != null) {
         this._extentDomain = prototype.ExtentDomain.Clone() as Extent;
     }
     if (prototype.ExtentAOI != null) {
         this._extentAOI = prototype.ExtentAOI.Clone() as Extent;
     }
     this._terrainDataSources = new List<TerrainDataSource>();
     foreach (TerrainDataSource terrainDataSource in prototype.TerrainDataSources) {
         this._terrainDataSources.Add((TerrainDataSource)terrainDataSource.Clone());
     }
     this._terrainPyramids = new List<TerrainPyramid>();
     foreach (TerrainPyramid terrainPyramid in prototype.TerrainPyramids) {
         this._terrainPyramids.Add((TerrainPyramid)terrainPyramid.Clone());
     }
     this._terrainID = prototype.TerrainID;
     this._version = prototype.Version;
 }
Example #9
0
 public Extent(Extent prototype) : base(prototype) {
     this._xMin = prototype.XMin;
     this._yMin = prototype.YMin;
     this._xMax = prototype.XMax;
     this._yMax = prototype.YMax;
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
 public FeatureDataset(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._extent = info.GetValue("extent", typeof(Extent)) as Extent;
     this._spatialReference = info.GetValue("spatialReference", typeof(SpatialReference)) as SpatialReference;
 }
Example #11
0
        //
        // CONSTRUCTOR
        //
        public Network(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");

            if (navigatorExtent != null)
            {
                this._extent = new Extent(navigatorExtent);
            }
            else
            {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");

            if (navigatorSpatialReference != null)
            {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else
            {
                this._spatialReference = new SpatialReference();
            }

            // <LogicalNetworkName>
            XPathNavigator navigatorLogicalNetworkName = navigator.SelectSingleNode("LogicalNetworkName");

            if (navigatorLogicalNetworkName != null)
            {
                this._logicalNetworkName = navigatorLogicalNetworkName.Value;
            }

            // <NetworkType>
            XPathNavigator navigatorNetworkType = navigator.SelectSingleNode("NetworkType");

            if (navigatorNetworkType != null)
            {
                this._networkType = (esriNetworkDatasetType)Enum.Parse(typeof(esriNetworkDatasetType), navigatorNetworkType.Value, true);
            }

            // <Buildable>
            XPathNavigator navigatorBuildable = navigator.SelectSingleNode("Buildable");

            if (navigatorBuildable != null)
            {
                this._buildable = navigatorBuildable.ValueAsBoolean;
            }

            // <SupportsTurns>
            XPathNavigator navigatorSupportsTurns = navigator.SelectSingleNode("SupportsTurns");

            if (navigatorSupportsTurns != null)
            {
                this._supportsTurns = navigatorSupportsTurns.ValueAsBoolean;
            }

            // <NetworkDirections>
            XPathNavigator navigatorNetworkDirections = navigator.SelectSingleNode("NetworkDirections");

            if (navigatorNetworkDirections != null)
            {
                this._networkDirections = new NetworkDirections(navigatorNetworkDirections);
            }
            else
            {
                this._networkDirections = new NetworkDirections();
            }

            // <Properties><PropertyArray><PropertySetProperty>
            this._properties = new List <Property>();
            XPathNodeIterator interatorProperty = navigator.Select("Properties/PropertyArray/PropertySetProperty");

            while (interatorProperty.MoveNext())
            {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._properties.Add(property);
            }

            // <UserData><PropertyArray><PropertySetProperty>
            this._userData = new List <Property>();
            XPathNodeIterator interatorProperty2 = navigator.Select("UserData/PropertyArray/PropertySetProperty");

            while (interatorProperty2.MoveNext())
            {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty2.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._userData.Add(property);
            }

            // <EdgeFeatureSources><EdgeFeatureSource>
            // <JunctionFeatureSources><JunctionFeatureSource>
            // <SystemJunctionSources><SystemJunctionSource>
            // <TurnFeatureSources><TurnFeatureSource>
            this._networkSources = new List <NetworkSource>();
            XPathNodeIterator interatorNetworkSource = navigator.Select(
                "EdgeFeatureSources/EdgeFeatureSource" + " | " +
                "JunctionFeatureSources/JunctionFeatureSource" + " | " +
                "SystemJunctionSources/SystemJunctionSource" + " | " +
                "TurnFeatureSources/TurnFeatureSource");

            while (interatorNetworkSource.MoveNext())
            {
                //
                XPathNavigator navigatorNetworkSource = interatorNetworkSource.Current;

                NetworkSource networkSource = null;
                switch (navigatorNetworkSource.Name)
                {
                case "EdgeFeatureSource":
                    networkSource = new EdgeFeatureSource(navigatorNetworkSource);
                    break;

                case "JunctionFeatureSource":
                    networkSource = new JunctionFeatureSource(navigatorNetworkSource);
                    break;

                case "SystemJunctionSource":
                    networkSource = new SystemJunctionSource(navigatorNetworkSource);
                    break;

                case "TurnFeatureSource":
                    networkSource = new TurnFeatureSource(navigatorNetworkSource);
                    break;
                }
                // Add EdgeFeatureSource
                if (networkSource != null)
                {
                    this._networkSources.Add(networkSource);
                }
            }

            // <EvaluatedNetworkAttributes><EvaluatedNetworkAttribute>
            // <NetworkAttributes><NetworkAttribute>
            this._networkAttributes = new List <NetworkAttribute>();
            XPathNodeIterator interatorNetworkAttribute = navigator.Select(
                "EvaluatedNetworkAttributes/EvaluatedNetworkAttribute" + " | " +
                "NetworkAttributes/NetworkAttribute");

            while (interatorNetworkAttribute.MoveNext())
            {
                //
                XPathNavigator navigatorNetworkAttribute = interatorNetworkAttribute.Current;

                NetworkAttribute networkAttribute = null;
                switch (navigatorNetworkAttribute.Name)
                {
                case "EvaluatedNetworkAttribute":
                    networkAttribute = new EvaluatedNetworkAttribute(navigatorNetworkAttribute);
                    break;

                case "NetworkAttribute":
                    networkAttribute = new NetworkAttribute(navigatorNetworkAttribute);
                    break;
                }
                // Add EdgeFeatureSource
                if (networkAttribute != null)
                {
                    this._networkAttributes.Add(networkAttribute);
                }
            }

            // <NetworkAssignments><NetworkAssignment>
            this._networkAssignments = new List <NetworkAssignment>();
            XPathNodeIterator interatorNetworkAssignment = navigator.Select("NetworkAssignments/NetworkAssignment");

            while (interatorNetworkAssignment.MoveNext())
            {
                // Get <NetworkAssignment>
                XPathNavigator navigatorNetworkAssignment = interatorNetworkAssignment.Current;

                // Add NetworkAssignment
                NetworkAssignment networkAssignment = new NetworkAssignment(navigatorNetworkAssignment);
                this._networkAssignments.Add(networkAssignment);
            }

            // <ConfigurationKeyword>
            XPathNavigator navigatorConfigurationKeyword = navigator.SelectSingleNode("ConfigurationKeyword");

            if (navigatorConfigurationKeyword != null)
            {
                this._configurationKeyword = navigatorConfigurationKeyword.Value;
            }
        }
        //
        // CONSTRUCTOR
        //
        public FeatureClass(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <FeatureType>
            XPathNavigator navigatorFeatureType = navigator.SelectSingleNode("FeatureType");
            if (navigatorFeatureType != null) {
                string featureType = navigatorFeatureType.Value;
                this._featureType = (esriFeatureType)Enum.Parse(typeof(esriFeatureType), featureType, true);
            }

            // <ShapeType>
            XPathNavigator navigatorShapeType = navigator.SelectSingleNode("ShapeType");
            if (navigatorShapeType != null) {
                string shapeType = navigatorShapeType.Value;
                this._shapeType = (esriGeometryType)Enum.Parse(typeof(esriGeometryType), shapeType, true);
            }

            // <ShapeFieldName>
            XPathNavigator navigatorShapeFieldName = navigator.SelectSingleNode("ShapeFieldName");
            if (navigatorShapeFieldName != null) {
                this._shapeFieldName = navigatorShapeFieldName.Value;
            }

            // <HasM>
            XPathNavigator navigatorHasM = navigator.SelectSingleNode("HasM");
            if (navigatorHasM != null) {
                this._hasM = navigatorHasM.ValueAsBoolean;
            }

            // <HasZ>
            XPathNavigator navigatorHasZ = navigator.SelectSingleNode("HasZ");
            if (navigatorHasZ != null) {
                this._hasZ = navigatorHasZ.ValueAsBoolean;
            }

            // <AreaFieldName>
            XPathNavigator navigatorAreaFieldName = navigator.SelectSingleNode("AreaFieldName");
            if (navigatorAreaFieldName != null) {
                this._areaFieldName = navigatorAreaFieldName.Value;
            }

            // <LengthFieldName>
            XPathNavigator navigatorLengthFieldName = navigator.SelectSingleNode("LengthFieldName");
            if (navigatorLengthFieldName != null) {
                this._lengthFieldName = navigatorLengthFieldName.Value;
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }
            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }
        }
 public FeatureClass(FeatureClass prototype) : base(prototype) {
     this._featureType = prototype.FeatureType;
     this._shapeType = prototype.ShapeType;
     this._shapeFieldName = prototype.ShapeFieldName;
     this._hasM = prototype.HasM;
     this._hasZ = prototype.HasZ;
     this._areaFieldName = prototype.AreaFieldName;
     this._lengthFieldName = prototype.LengthFieldName;
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
 public FeatureClass(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._featureType = (esriFeatureType)Enum.Parse(typeof(esriFeatureType), info.GetString("featureType"), true);
     this._shapeType = (esriGeometryType)Enum.Parse(typeof(esriGeometryType), info.GetString("shapeType"), true);
     this._shapeFieldName = info.GetString("shapeFieldName");
     this._hasM = info.GetBoolean("hasM");
     this._hasZ = info.GetBoolean("hasZ");
     this._areaFieldName = info.GetString("areaFieldName");
     this._lengthFieldName = info.GetString("lengthFieldName");
     this._extent = info.GetValue("extent", typeof(Extent)) as Extent;
     this._spatialReference = info.GetValue("spatialReference", typeof(SpatialReference)) as SpatialReference;
 }
Example #15
0
        //
        // CONSTRUCTOR
        //
        public Network(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }

            // <LogicalNetworkName>
            XPathNavigator navigatorLogicalNetworkName = navigator.SelectSingleNode("LogicalNetworkName");
            if (navigatorLogicalNetworkName != null) {
                this._logicalNetworkName = navigatorLogicalNetworkName.Value;
            }

            // <NetworkType>
            XPathNavigator navigatorNetworkType = navigator.SelectSingleNode("NetworkType");
            if (navigatorNetworkType != null) {
                this._networkType = (esriNetworkDatasetType)Enum.Parse(typeof(esriNetworkDatasetType), navigatorNetworkType.Value, true);
            }

            // <Buildable>
            XPathNavigator navigatorBuildable = navigator.SelectSingleNode("Buildable");
            if (navigatorBuildable != null) {
                this._buildable = navigatorBuildable.ValueAsBoolean;
            }

            // <SupportsTurns>
            XPathNavigator navigatorSupportsTurns = navigator.SelectSingleNode("SupportsTurns");
            if (navigatorSupportsTurns != null) {
                this._supportsTurns = navigatorSupportsTurns.ValueAsBoolean;
            }

            // <NetworkDirections>
            XPathNavigator navigatorNetworkDirections = navigator.SelectSingleNode("NetworkDirections");
            if (navigatorNetworkDirections != null) {
                this._networkDirections = new NetworkDirections(navigatorNetworkDirections);
            }
            else {
                this._networkDirections = new NetworkDirections();
            }

            // <Properties><PropertyArray><PropertySetProperty>
            this._properties = new List<Property>();
            XPathNodeIterator interatorProperty = navigator.Select("Properties/PropertyArray/PropertySetProperty");
            while (interatorProperty.MoveNext()) {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._properties.Add(property);
            }

            // <UserData><PropertyArray><PropertySetProperty>
            this._userData = new List<Property>();
            XPathNodeIterator interatorProperty2 = navigator.Select("UserData/PropertyArray/PropertySetProperty");
            while (interatorProperty2.MoveNext()) {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty2.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._userData.Add(property);
            }

            // <EdgeFeatureSources><EdgeFeatureSource>
            // <JunctionFeatureSources><JunctionFeatureSource>
            // <SystemJunctionSources><SystemJunctionSource>
            // <TurnFeatureSources><TurnFeatureSource>
            this._networkSources = new List<NetworkSource>();
            XPathNodeIterator interatorNetworkSource = navigator.Select(
                "EdgeFeatureSources/EdgeFeatureSource" + " | " + 
                "JunctionFeatureSources/JunctionFeatureSource" + " | " + 
                "SystemJunctionSources/SystemJunctionSource" + " | " + 
                "TurnFeatureSources/TurnFeatureSource");
            while (interatorNetworkSource.MoveNext()) {
                // 
                XPathNavigator navigatorNetworkSource = interatorNetworkSource.Current;

                NetworkSource networkSource = null;
                switch (navigatorNetworkSource.Name) {
                    case "EdgeFeatureSource":
                        networkSource = new EdgeFeatureSource(navigatorNetworkSource);
                        break;
                    case "JunctionFeatureSource":
                        networkSource = new JunctionFeatureSource(navigatorNetworkSource);
                        break;
                    case "SystemJunctionSource":
                        networkSource = new SystemJunctionSource(navigatorNetworkSource);
                        break;
                    case "TurnFeatureSource":
                        networkSource = new TurnFeatureSource(navigatorNetworkSource);
                        break;
                }
                // Add EdgeFeatureSource
                if (networkSource != null) {
                    this._networkSources.Add(networkSource);
                }
            }

            // <EvaluatedNetworkAttributes><EvaluatedNetworkAttribute>
            // <NetworkAttributes><NetworkAttribute>
            this._networkAttributes = new List<NetworkAttribute>();
            XPathNodeIterator interatorNetworkAttribute = navigator.Select(
                "EvaluatedNetworkAttributes/EvaluatedNetworkAttribute" + " | " +
                "NetworkAttributes/NetworkAttribute");
            while (interatorNetworkAttribute.MoveNext()) {
                // 
                XPathNavigator navigatorNetworkAttribute = interatorNetworkAttribute.Current;

                NetworkAttribute networkAttribute = null;
                switch (navigatorNetworkAttribute.Name) {
                    case "EvaluatedNetworkAttribute":
                        networkAttribute = new EvaluatedNetworkAttribute(navigatorNetworkAttribute);
                        break;
                    case "NetworkAttribute":
                        networkAttribute = new NetworkAttribute(navigatorNetworkAttribute);
                        break;
                }
                // Add EdgeFeatureSource
                if (networkAttribute != null) {
                    this._networkAttributes.Add(networkAttribute);
                }
            }

            // <NetworkAssignments><NetworkAssignment>
            this._networkAssignments = new List<NetworkAssignment>();
            XPathNodeIterator interatorNetworkAssignment = navigator.Select("NetworkAssignments/NetworkAssignment");
            while (interatorNetworkAssignment.MoveNext()) {
                // Get <NetworkAssignment>
                XPathNavigator navigatorNetworkAssignment = interatorNetworkAssignment.Current;

                // Add NetworkAssignment
                NetworkAssignment networkAssignment = new NetworkAssignment(navigatorNetworkAssignment);
                this._networkAssignments.Add(networkAssignment);
            }

            // <ConfigurationKeyword>
            XPathNavigator navigatorConfigurationKeyword = navigator.SelectSingleNode("ConfigurationKeyword");
            if (navigatorConfigurationKeyword != null) {
                this._configurationKeyword = navigatorConfigurationKeyword.Value;
            }
        }
Example #16
0
 public Network(Network prototype) : base(prototype) {
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._logicalNetworkName = prototype.LogicalNetworkName;
     this._networkType = prototype.NetworkType;
     this._buildable = prototype.Buildable;
     this._supportsTurns = prototype.SupportsTurns;
     this._networkDirections = (NetworkDirections)prototype.NetworkDirections.Clone();
     this._properties = new List<Property>();
     foreach (Property property in prototype.PropertyCollection) {
         this._properties.Add((Property)property.Clone());
     }
     this._userData = new List<Property>();
     foreach (Property property in prototype.UserDataCollection) {
         this._userData.Add((Property)property.Clone());
     }
     this._networkSources = new List<NetworkSource>();
     foreach (NetworkSource networkSource in prototype.NetworkSourceCollection) {
         this._networkSources.Add((NetworkSource)networkSource.Clone());
     }
     this._networkAttributes = new List<NetworkAttribute>();
     foreach (NetworkAttribute networkAttribute in prototype.NetworkAttributeCollection) {
         this._networkAttributes.Add((NetworkAttribute)networkAttribute.Clone());
     }
     this._networkAssignments = new List<NetworkAssignment>();
     foreach (NetworkAssignment networkAssignment in prototype.NetworkAssignmentCollection) {
         this._networkAssignments.Add((NetworkAssignment)networkAssignment.Clone());
     }
     this._configurationKeyword = prototype.ConfigurationKeyword;
 }
Example #17
0
 public Network(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._extent = (Extent)info.GetValue("extent", typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
     this._logicalNetworkName = info.GetString("logicalNetworkName");
     this._networkType = (esriNetworkDatasetType)Enum.Parse(typeof(esriNetworkDatasetType), info.GetString("networkType"), true);
     this._buildable = info.GetBoolean("buildable");
     this._supportsTurns = info.GetBoolean("supportsTurns");
     this._networkDirections = (NetworkDirections)info.GetValue("networkDirections", typeof(NetworkDirections));
     this._properties = (List<Property>)info.GetValue("properties", typeof(List<Property>));
     this._userData = (List<Property>)info.GetValue("userData", typeof(List<Property>));
     this._networkSources = (List<NetworkSource>)info.GetValue("networkSources", typeof(List<NetworkSource>));
     this._networkAttributes = (List<NetworkAttribute>)info.GetValue("networkAttributes", typeof(List<NetworkAttribute>));
     this._networkAssignments = (List<NetworkAssignment>)info.GetValue("networkAssignments", typeof(List<NetworkAssignment>));
     this._configurationKeyword = info.GetString("configurationKeyword");
 }
        //
        // CONSTRUCTOR
        //
        public GeometricNetwork(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Extent></Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }

            // <NetworkType></NetworkType>
            XPathNavigator navigatorNetworkType = navigator.SelectSingleNode("NetworkType");
            if (navigatorNetworkType != null) {
                this._networkType = (esriNetworkType)Enum.Parse(typeof(esriNetworkType), navigatorNetworkType.Value, true);
            }

            // <OrphanJunctionFeatureClassName></OrphanJunctionFeatureClassName>
            XPathNavigator navigatorOrphanJunctionFeatureClassName = navigator.SelectSingleNode("OrphanJunctionFeatureClassName");
            if (navigatorOrphanJunctionFeatureClassName != null) {
                this._orphanJunctionFeatureClassName = navigatorOrphanJunctionFeatureClassName.Value;
            }

            // Create ESRI Namespace Manager
            XmlNamespaceManager namespaceManager = new XmlNamespaceManager(navigator.NameTable);
            namespaceManager.AddNamespace(Xml._XSI, Xml.XMLSCHEMAINSTANCE);
            
            // <ConnectivityRules><ConnectivityRule></ConnectivityRule></ConnectivityRules>
            this._connectivityRules = new List<ConnectivityRule>();
            XPathNodeIterator interatorConnectivityRule = navigator.Select("ConnectivityRules/ConnectivityRule");
            while (interatorConnectivityRule.MoveNext()) {
                // Get <ConnectivityRule>
                XPathNavigator navigatorConnectivityRule = interatorConnectivityRule.Current;
                XPathNavigator type = navigatorConnectivityRule.SelectSingleNode(Xml._XSITYPE, namespaceManager);
                switch (type.Value) {
                    case "esri:EdgeConnectivityRule":
                        this._connectivityRules.Add(new EdgeConnectivityRule(navigatorConnectivityRule));
                        break;
                    case "esri:JunctionConnectivityRule":
                        this._connectivityRules.Add(new JunctionConnectivityRule(navigatorConnectivityRule));
                        break;
                }
            }

            // <NetworkWeights><NetWeight></NetWeight></NetworkWeights>
            this._netWeights = new List<NetWeight>();
            XPathNodeIterator interatorNetWeight = navigator.Select("NetworkWeights/NetWeight");
            while (interatorNetWeight.MoveNext()) {
                // Get <NetWeight>
                XPathNavigator navigatorNetWeight = interatorNetWeight.Current;
                if (navigatorNetWeight != null) {
                    this._netWeights.Add(new NetWeight(navigatorNetWeight));
                }
            }

            // <WeightAssociations><NetWeightAssociation></NetWeightAssociation></WeightAssociations>
            this._netWeightAssociations = new List<NetWeightAssociation>();
            XPathNodeIterator interatorNetWeightAssociation = navigator.Select("WeightAssociations/NetWeightAssociation");
            while (interatorNetWeightAssociation.MoveNext()) {
                // Get <NetWeightAssociation>
                XPathNavigator navigatorNetWeightAssociation = interatorNetWeightAssociation.Current;
                if (navigatorNetWeightAssociation != null) {
                    this._netWeightAssociations.Add(new NetWeightAssociation(navigatorNetWeightAssociation));
                }
            }
        }
        //
        // CONSTRUCTOR
        //
        public RasterBand(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <OIDFieldName>
            XPathNavigator navigatorOIDFieldName = navigator.SelectSingleNode("OIDFieldName");

            if (navigatorOIDFieldName != null)
            {
                this._oidFieldName = navigatorOIDFieldName.Value;
            }

            // Create Fields Group
            TableGroup tableGroupFields = new TableGroup();

            tableGroupFields.Expanded = true;
            tableGroupFields.Text     = "Fields";
            this.Groups.Add(tableGroupFields);

            XPathNodeIterator interatorField = navigator.Select("Fields/FieldArray/Field");

            while (interatorField.MoveNext())
            {
                // Create Field
                XPathNavigator navigatorField = interatorField.Current;
                Field          field          = new Field(navigatorField, this);

                // Add Field To Group
                tableGroupFields.Rows.Add(field);
            }

            // Create Indexes Group
            TableGroup tableGroupIndexes = new TableGroup();

            tableGroupIndexes.Expanded = true;
            tableGroupIndexes.Text     = "Indexes";
            this.Groups.Add(tableGroupIndexes);

            XPathNodeIterator interatorIndex = navigator.Select("Indexes/IndexArray/Index");

            while (interatorIndex.MoveNext())
            {
                // Add Index
                XPathNavigator navigatorIndex = interatorIndex.Current;
                Index          index          = new Index(navigatorIndex);
                tableGroupIndexes.Groups.Add(index);

                // Add Field Index
                XPathNodeIterator interatorIndexField = navigatorIndex.Select("Fields/FieldArray/Field");
                while (interatorIndexField.MoveNext())
                {
                    XPathNavigator navigatorIndexField = interatorIndexField.Current;
                    IndexField     indexField          = new IndexField(navigatorIndexField);
                    index.Rows.Add(indexField);
                }
            }

            // <IsInteger>
            XPathNavigator navigatorIsInteger = navigator.SelectSingleNode("IsInteger");

            if (navigatorIsInteger != null)
            {
                this._isInteger = navigatorIsInteger.ValueAsBoolean;
            }

            // <MeanCellHeight>
            XPathNavigator navigatorMeanCellHeight = navigator.SelectSingleNode("MeanCellHeight");

            if (navigatorMeanCellHeight != null)
            {
                this._meanCellHeight = navigatorMeanCellHeight.ValueAsDouble;
            }

            // <MeanCellWidth>
            XPathNavigator navigatorMeanCellWidth = navigator.SelectSingleNode("MeanCellWidth");

            if (navigatorMeanCellWidth != null)
            {
                this._meanCellWidth = navigatorMeanCellWidth.ValueAsDouble;
            }

            // <Height>
            XPathNavigator navigatorHeight = navigator.SelectSingleNode("Height");

            if (navigatorHeight != null)
            {
                this._height = navigatorHeight.ValueAsInt;
            }

            // <Width>
            XPathNavigator navigatorWidth = navigator.SelectSingleNode("Width");

            if (navigatorWidth != null)
            {
                this._width = navigatorWidth.ValueAsInt;
            }

            // <PixelType>
            XPathNavigator navigatorPixelType = navigator.SelectSingleNode("PixelType");

            if (navigatorPixelType != null)
            {
                this._pixelType = GeodatabaseUtility.GetPixelType(navigatorPixelType.Value);
            }

            // <PrimaryField>
            XPathNavigator navigatorPrimaryField = navigator.SelectSingleNode("PrimaryField");

            if (navigatorPrimaryField != null)
            {
                this._primaryField = navigatorPrimaryField.ValueAsInt;
            }

            // <TableType>
            XPathNavigator navigatorTableType = navigator.SelectSingleNode("TableType");

            if (navigatorTableType != null)
            {
                this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), navigatorTableType.Value, true);
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");

            if (navigatorExtent != null)
            {
                this._extent = new Extent(navigatorExtent);
            }
            else
            {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");

            if (navigatorSpatialReference != null)
            {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else
            {
                this._spatialReference = new SpatialReference();
            }
        }
Example #20
0
 public Topology(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._extent = (Extent)info.GetValue(Topology.EXTENT_, typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue(Topology.SPATIALREFERENCE_, typeof(SpatialReference));
     this._clusterTolerance = info.GetDouble(Topology.CLUSTERTOLERANCE_);
     this._zClusterTolerance = info.GetDouble(Topology.ZCLUSTERTOLERANCE_);
     this._maxGeneratedErrorCount = info.GetInt32(Topology.MAXGENERATEDERRORCOUNT_);
     this._topologyRules = (List<TopologyRule>)info.GetValue(Topology.TOPOLOGYRULES_, typeof(List<TopologyRule>));
 }
Example #21
0
 public FeatureDataset(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._extent           = info.GetValue("extent", typeof(Extent)) as Extent;
     this._spatialReference = info.GetValue("spatialReference", typeof(SpatialReference)) as SpatialReference;
 }
Example #22
0
        //
        // CONSTRUCTOR
        //
        public RasterBand(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <OIDFieldName>
            XPathNavigator navigatorOIDFieldName = navigator.SelectSingleNode("OIDFieldName");
            if (navigatorOIDFieldName != null) {
                this._oidFieldName = navigatorOIDFieldName.Value;
            }

            // Create Fields Group
            TableGroup tableGroupFields = new TableGroup();
            tableGroupFields.Expanded = true;
            tableGroupFields.Text = "Fields";
            this.Groups.Add(tableGroupFields);

            XPathNodeIterator interatorField = navigator.Select("Fields/FieldArray/Field");
            while (interatorField.MoveNext()) {
                // Create Field
                XPathNavigator navigatorField = interatorField.Current;
                Field field = new Field(navigatorField, this);

                // Add Field To Group
                tableGroupFields.Rows.Add(field);
            }

            // Create Indexes Group
            TableGroup tableGroupIndexes = new TableGroup();
            tableGroupIndexes.Expanded = true;
            tableGroupIndexes.Text = "Indexes";
            this.Groups.Add(tableGroupIndexes);

            XPathNodeIterator interatorIndex = navigator.Select("Indexes/IndexArray/Index");
            while (interatorIndex.MoveNext()) {
                // Add Index
                XPathNavigator navigatorIndex = interatorIndex.Current;
                Index index = new Index(navigatorIndex);
                tableGroupIndexes.Groups.Add(index);

                // Add Field Index
                XPathNodeIterator interatorIndexField = navigatorIndex.Select("Fields/FieldArray/Field");
                while (interatorIndexField.MoveNext()) {
                    XPathNavigator navigatorIndexField = interatorIndexField.Current;
                    IndexField indexField = new IndexField(navigatorIndexField);
                    index.Rows.Add(indexField);
                }
            }

            // <IsInteger>
            XPathNavigator navigatorIsInteger = navigator.SelectSingleNode("IsInteger");
            if (navigatorIsInteger != null) {
                this._isInteger = navigatorIsInteger.ValueAsBoolean;
            }

            // <MeanCellHeight>
            XPathNavigator navigatorMeanCellHeight = navigator.SelectSingleNode("MeanCellHeight");
            if (navigatorMeanCellHeight != null) {
                this._meanCellHeight = navigatorMeanCellHeight.ValueAsDouble;
            }

            // <MeanCellWidth>
            XPathNavigator navigatorMeanCellWidth = navigator.SelectSingleNode("MeanCellWidth");
            if (navigatorMeanCellWidth != null) {
                this._meanCellWidth = navigatorMeanCellWidth.ValueAsDouble;
            }

            // <Height>
            XPathNavigator navigatorHeight = navigator.SelectSingleNode("Height");
            if (navigatorHeight != null) {
                this._height = navigatorHeight.ValueAsInt;
            }

            // <Width>
            XPathNavigator navigatorWidth = navigator.SelectSingleNode("Width");
            if (navigatorWidth != null) {
                this._width = navigatorWidth.ValueAsInt;
            }

            // <PixelType>
            XPathNavigator navigatorPixelType = navigator.SelectSingleNode("PixelType");
            if (navigatorPixelType != null) {
                this._pixelType = GeodatabaseUtility.GetPixelType(navigatorPixelType.Value);
            }

            // <PrimaryField>
            XPathNavigator navigatorPrimaryField = navigator.SelectSingleNode("PrimaryField");
            if (navigatorPrimaryField != null) {
                this._primaryField = navigatorPrimaryField.ValueAsInt;
            }

            // <TableType>
            XPathNavigator navigatorTableType = navigator.SelectSingleNode("TableType");
            if (navigatorTableType != null) {
                this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), navigatorTableType.Value, true);
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }
        }
        //
        // CONSTRUCTOR
        //
        public FeatureClass(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <FeatureType>
            XPathNavigator navigatorFeatureType = navigator.SelectSingleNode("FeatureType");

            if (navigatorFeatureType != null)
            {
                string featureType = navigatorFeatureType.Value;
                this._featureType = (esriFeatureType)Enum.Parse(typeof(esriFeatureType), featureType, true);
            }

            // <ShapeType>
            XPathNavigator navigatorShapeType = navigator.SelectSingleNode("ShapeType");

            if (navigatorShapeType != null)
            {
                string shapeType = navigatorShapeType.Value;
                this._shapeType = (esriGeometryType)Enum.Parse(typeof(esriGeometryType), shapeType, true);
            }

            // <ShapeFieldName>
            XPathNavigator navigatorShapeFieldName = navigator.SelectSingleNode("ShapeFieldName");

            if (navigatorShapeFieldName != null)
            {
                this._shapeFieldName = navigatorShapeFieldName.Value;
            }

            // <HasM>
            XPathNavigator navigatorHasM = navigator.SelectSingleNode("HasM");

            if (navigatorHasM != null)
            {
                this._hasM = navigatorHasM.ValueAsBoolean;
            }

            // <HasZ>
            XPathNavigator navigatorHasZ = navigator.SelectSingleNode("HasZ");

            if (navigatorHasZ != null)
            {
                this._hasZ = navigatorHasZ.ValueAsBoolean;
            }

            // <AreaFieldName>
            XPathNavigator navigatorAreaFieldName = navigator.SelectSingleNode("AreaFieldName");

            if (navigatorAreaFieldName != null)
            {
                this._areaFieldName = navigatorAreaFieldName.Value;
            }

            // <LengthFieldName>
            XPathNavigator navigatorLengthFieldName = navigator.SelectSingleNode("LengthFieldName");

            if (navigatorLengthFieldName != null)
            {
                this._lengthFieldName = navigatorLengthFieldName.Value;
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");

            if (navigatorExtent != null)
            {
                this._extent = new Extent(navigatorExtent);
            }
            else
            {
                this._extent = new Extent();
            }
            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");

            if (navigatorSpatialReference != null)
            {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else
            {
                this._spatialReference = new SpatialReference();
            }
        }
Example #24
0
        //
        // CONSTRUCTOR
        //
        public Terrain(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <ConfigurationKeyword></ConfigurationKeyword>
            XPathNavigator navigatorConfigurationKeyword = navigator.SelectSingleNode("ConfigurationKeyword");

            if (navigatorConfigurationKeyword != null)
            {
                this._configurationKeyword = navigatorConfigurationKeyword.Value;
            }

            // <Extent></Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");

            if (navigatorExtent != null && !string.IsNullOrEmpty(navigatorExtent.InnerXml))
            {
                this._extent = new Extent(navigatorExtent);
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");

            if (navigatorSpatialReference != null && !string.IsNullOrEmpty(navigatorSpatialReference.InnerXml))
            {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }

            // <FeatureDatasetName></FeatureDatasetName>
            // Do not load. This can be inferred.

            // <PyramidType></PyramidType>
            XPathNavigator navigatorPyramidType = navigator.SelectSingleNode("PyramidType");

            if (navigatorPyramidType != null)
            {
                this._pyramidType = (esriTerrainPyramidType)Enum.Parse(typeof(esriTerrainPyramidType), navigatorPyramidType.Value, true);
            }

            // <WindowSizeMethod></WindowSizeMethod>
            XPathNavigator navigatorWindowSizeMethod = navigator.SelectSingleNode("WindowSizeMethod");

            if (navigatorWindowSizeMethod != null)
            {
                this._windowSizeMethod = (esriTerrainWindowSizeMethod)Enum.Parse(typeof(esriTerrainWindowSizeMethod), navigatorWindowSizeMethod.Value, true);
            }

            // <WindowSizeZThreshold></WindowSizeZThreshold>
            XPathNavigator navigatorWindowSizeZThreshold = navigator.SelectSingleNode("WindowSizeZThreshold");

            if (navigatorWindowSizeZThreshold != null)
            {
                this._windowSizeZThreshold = navigatorWindowSizeZThreshold.ValueAsDouble;
            }

            // <WindowSizeZThresholdStrategy></WindowSizeZThresholdStrategy>
            XPathNavigator navigatorWindowSizeZThresholdStrategy = navigator.SelectSingleNode("WindowSizeZThresholdStrategy");

            if (navigatorWindowSizeZThresholdStrategy != null)
            {
                this._windowSizeZThresholdStrategy = (esriTerrainZThresholdStrategy)Enum.Parse(typeof(esriTerrainZThresholdStrategy), navigatorWindowSizeZThresholdStrategy.Value, true);
            }

            // <TileSize></TileSize>
            XPathNavigator navigatorTileSize = navigator.SelectSingleNode("TileSize");

            if (navigatorTileSize != null)
            {
                this._tileSize = navigatorTileSize.ValueAsDouble;
            }

            // <MaxShapeSize></MaxShapeSize>
            XPathNavigator navigatorMaxShapeSize = navigator.SelectSingleNode("MaxShapeSize");

            if (navigatorMaxShapeSize != null)
            {
                this._maxShapeSize = navigatorMaxShapeSize.ValueAsInt;
            }

            // <MaxOverviewSize></MaxOverviewSize>
            XPathNavigator navigatorMaxOverviewSize = navigator.SelectSingleNode("MaxOverviewSize");

            if (navigatorMaxOverviewSize != null)
            {
                this._maxOverviewSize = navigatorMaxOverviewSize.ValueAsInt;
            }

            // <ExtentDomain></ExtentDomain>
            XPathNavigator navigatorExtentDomain = navigator.SelectSingleNode("ExtentDomain");

            if (navigatorExtentDomain != null && !string.IsNullOrEmpty(navigatorExtentDomain.InnerXml))
            {
                this._extentDomain = new Extent(navigatorExtentDomain);
            }

            // <ExtentAOI></ExtentAOI>
            XPathNavigator navigatorExtentAOI = navigator.SelectSingleNode("ExtentAOI");

            if (navigatorExtentAOI != null && !string.IsNullOrEmpty(navigatorExtentAOI.InnerXml))
            {
                this._extentAOI = new Extent(navigatorExtentAOI);
            }

            // <TerrainDataSources>
            //     <TerrainDataSource>
            //     </TerrainDataSource>
            // </TerrainDataSources>
            this._terrainDataSources = new List <TerrainDataSource>();
            XPathNodeIterator interatorTerrainDataSource = navigator.Select("TerrainDataSources/TerrainDataSource");

            while (interatorTerrainDataSource.MoveNext())
            {
                // Get <ConnectivityRule>
                XPathNavigator    navigatorTerrainDataSource = interatorTerrainDataSource.Current;
                TerrainDataSource terrainDataSource          = new TerrainDataSource(navigatorTerrainDataSource);
                this._terrainDataSources.Add(terrainDataSource);
            }

            // TerrainPyramids
            this._terrainPyramids = new List <TerrainPyramid>();
            string pyramidPath = null;

            switch (this._pyramidType)
            {
            case esriTerrainPyramidType.esriTerrainPyramidWindowSize:
                // <TerrainPyramidLevelWindowSizes>
                //    <TerrainPyramidLevelWindowSize>
                //    </TerrainPyramidLevelWindowSize>
                // </TerrainPyramidLevelWindowSizes>
                pyramidPath = "TerrainPyramidLevelWindowSizes/TerrainPyramidLevelWindowSize";
                break;

            case esriTerrainPyramidType.esriTerrainPyramidZTolerance:
                // <TerrainPyramidLevelZTols>
                //    <TerrainPyramidLevelZTol>
                //    </TerrainPyramidLevelZTol>
                // </TerrainPyramidLevelZTols>
                pyramidPath = "TerrainPyramidLevelZTols/TerrainPyramidLevelZTol";
                break;
            }
            XPathNodeIterator interatorTerrainPyramid = navigator.Select(pyramidPath);

            while (interatorTerrainPyramid.MoveNext())
            {
                // Get <ConnectivityRule>
                XPathNavigator navigatorTerrainPyramid = interatorTerrainPyramid.Current;
                TerrainPyramid terrainPyramid          = new TerrainPyramid(navigatorTerrainPyramid);
                this._terrainPyramids.Add(terrainPyramid);
            }

            // <TerrainID></TerrainID>
            XPathNavigator navigatorTerrainID = navigator.SelectSingleNode("TerrainID");

            if (navigatorTerrainID != null)
            {
                this._terrainID = navigatorTerrainID.ValueAsInt;
            }

            // <Version></Version>
            XPathNavigator navigatorVersion = navigator.SelectSingleNode("Version");

            if (navigatorVersion != null)
            {
                this._version = navigatorVersion.ValueAsInt;
            }
        }
Example #25
0
 public Topology(Topology prototype) : base(prototype) {
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._clusterTolerance = prototype.ClusterTolerance;
     this._zClusterTolerance = prototype.ZClusterTolerance;
     this._maxGeneratedErrorCount = prototype.MaxGeneratedErrorCount;
     this._topologyRules = new List<TopologyRule>();
     foreach (TopologyRule topologyRule in prototype.TopologyRules) {
         this._topologyRules.Add((TopologyRule)topologyRule.Clone());
     }
 }
 public RasterDataset(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._extent = (Extent)info.GetValue("extent", typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
     this._format = info.GetString("format");
     this._compressionType = info.GetString("compressionType");
     this._sensorType = info.GetString("sensorType");
     this._permanent = info.GetBoolean("permanent");
     this._storageDef = (StorageDef)info.GetValue("storageDef", typeof(StorageDef));
 }
Example #27
0
 public Terrain(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._configurationKeyword = info.GetString("configurationKeyword");
     this._extent = info.GetValue("extent", typeof(Extent)) as Extent;
     this._spatialReference = info.GetValue("spatialReference", typeof(SpatialReference)) as SpatialReference;
     this._pyramidType = (esriTerrainPyramidType)Enum.Parse(typeof(esriTerrainPyramidType), info.GetString("pyramidType"), true);
     this._windowSizeMethod = (esriTerrainWindowSizeMethod)Enum.Parse(typeof(esriTerrainWindowSizeMethod), info.GetString("windowSizeMethod"), true);
     this._windowSizeZThreshold = info.GetDouble("windowSizeZThreshold");
     this._windowSizeZThresholdStrategy = (esriTerrainZThresholdStrategy)Enum.Parse(typeof(esriTerrainZThresholdStrategy), info.GetString("windowSizeZThresholdStrategy"), true);
     this._tileSize = info.GetDouble("tileSize");
     this._maxShapeSize = info.GetInt32("maxShapeSize");
     this._maxOverviewSize = info.GetInt32("maxOverviewSize");
     this._extentDomain = info.GetValue("extentDomain", typeof(Extent)) as Extent;
     this._extentAOI = info.GetValue("extentAOI", typeof(Extent)) as Extent;
     this._terrainDataSources = (List<TerrainDataSource>)info.GetValue("terrainDataSources", typeof(List<TerrainDataSource>));
     this._terrainPyramids = (List<TerrainPyramid>)info.GetValue("terrainPyramids", typeof(List<TerrainPyramid>));
     this._terrainID = info.GetInt32("terrainID");
     this._version = info.GetInt32("version");
 }
 public RasterDataset(RasterDataset prototype) : base(prototype) {
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._format = prototype.Format;
     this._compressionType = prototype.CompressionType;
     this._sensorType = prototype.SensorType;
     this._permanent = prototype.Permanent;
     if (prototype.StorageDef != null) {
         this._storageDef = prototype.StorageDef.Clone() as StorageDef;
     }
 }
Example #29
0
        //
        // CONSTRUCTOR
        //
        public Terrain(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <ConfigurationKeyword></ConfigurationKeyword>
            XPathNavigator navigatorConfigurationKeyword = navigator.SelectSingleNode("ConfigurationKeyword");
            if (navigatorConfigurationKeyword != null) {
                this._configurationKeyword = navigatorConfigurationKeyword.Value;
            }

            // <Extent></Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null && !string.IsNullOrEmpty(navigatorExtent.InnerXml)) {
                this._extent = new Extent(navigatorExtent);
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null && !string.IsNullOrEmpty(navigatorSpatialReference.InnerXml)) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }

            // <FeatureDatasetName></FeatureDatasetName> 
            // Do not load. This can be inferred.

            // <PyramidType></PyramidType>
            XPathNavigator navigatorPyramidType = navigator.SelectSingleNode("PyramidType");
            if (navigatorPyramidType != null) {
                this._pyramidType = (esriTerrainPyramidType)Enum.Parse(typeof(esriTerrainPyramidType), navigatorPyramidType.Value, true);
            }

            // <WindowSizeMethod></WindowSizeMethod>
            XPathNavigator navigatorWindowSizeMethod = navigator.SelectSingleNode("WindowSizeMethod");
            if (navigatorWindowSizeMethod != null) {
                this._windowSizeMethod = (esriTerrainWindowSizeMethod)Enum.Parse(typeof(esriTerrainWindowSizeMethod), navigatorWindowSizeMethod.Value, true);
            }

            // <WindowSizeZThreshold></WindowSizeZThreshold>
            XPathNavigator navigatorWindowSizeZThreshold = navigator.SelectSingleNode("WindowSizeZThreshold");
            if (navigatorWindowSizeZThreshold != null) {
                this._windowSizeZThreshold = navigatorWindowSizeZThreshold.ValueAsDouble;
            }

            // <WindowSizeZThresholdStrategy></WindowSizeZThresholdStrategy>
            XPathNavigator navigatorWindowSizeZThresholdStrategy = navigator.SelectSingleNode("WindowSizeZThresholdStrategy");
            if (navigatorWindowSizeZThresholdStrategy != null) {
                this._windowSizeZThresholdStrategy = (esriTerrainZThresholdStrategy)Enum.Parse(typeof(esriTerrainZThresholdStrategy), navigatorWindowSizeZThresholdStrategy.Value, true);
            }

            // <TileSize></TileSize>
            XPathNavigator navigatorTileSize = navigator.SelectSingleNode("TileSize");
            if (navigatorTileSize != null) {
                this._tileSize = navigatorTileSize.ValueAsDouble;
            }

            // <MaxShapeSize></MaxShapeSize>
            XPathNavigator navigatorMaxShapeSize = navigator.SelectSingleNode("MaxShapeSize");
            if (navigatorMaxShapeSize != null) {
                this._maxShapeSize = navigatorMaxShapeSize.ValueAsInt;
            }

            // <MaxOverviewSize></MaxOverviewSize>
            XPathNavigator navigatorMaxOverviewSize = navigator.SelectSingleNode("MaxOverviewSize");
            if (navigatorMaxOverviewSize != null) {
                this._maxOverviewSize = navigatorMaxOverviewSize.ValueAsInt;
            }

            // <ExtentDomain></ExtentDomain>
            XPathNavigator navigatorExtentDomain = navigator.SelectSingleNode("ExtentDomain");
            if (navigatorExtentDomain != null && !string.IsNullOrEmpty(navigatorExtentDomain.InnerXml)) {
                this._extentDomain = new Extent(navigatorExtentDomain);
            }

            // <ExtentAOI></ExtentAOI>
            XPathNavigator navigatorExtentAOI = navigator.SelectSingleNode("ExtentAOI");
            if (navigatorExtentAOI != null && !string.IsNullOrEmpty(navigatorExtentAOI.InnerXml)) {
                this._extentAOI = new Extent(navigatorExtentAOI);
            }

            // <TerrainDataSources>
            //     <TerrainDataSource>
            //     </TerrainDataSource>
            // </TerrainDataSources>
            this._terrainDataSources = new List<TerrainDataSource>();
            XPathNodeIterator interatorTerrainDataSource = navigator.Select("TerrainDataSources/TerrainDataSource");
            while (interatorTerrainDataSource.MoveNext()) {
                // Get <ConnectivityRule>
                XPathNavigator navigatorTerrainDataSource = interatorTerrainDataSource.Current;
                TerrainDataSource terrainDataSource = new TerrainDataSource(navigatorTerrainDataSource);
                this._terrainDataSources.Add(terrainDataSource);
            }

            // TerrainPyramids
            this._terrainPyramids = new List<TerrainPyramid>();
            string pyramidPath = null;
            switch(this._pyramidType){
                case esriTerrainPyramidType.esriTerrainPyramidWindowSize:
                    // <TerrainPyramidLevelWindowSizes>
                    //    <TerrainPyramidLevelWindowSize>
                    //    </TerrainPyramidLevelWindowSize>
                    // </TerrainPyramidLevelWindowSizes>
                    pyramidPath = "TerrainPyramidLevelWindowSizes/TerrainPyramidLevelWindowSize";
                    break;
                case esriTerrainPyramidType.esriTerrainPyramidZTolerance:
                    // <TerrainPyramidLevelZTols>
                    //    <TerrainPyramidLevelZTol>
                    //    </TerrainPyramidLevelZTol>
                    // </TerrainPyramidLevelZTols>
                    pyramidPath = "TerrainPyramidLevelZTols/TerrainPyramidLevelZTol";
                    break;
            }
            XPathNodeIterator interatorTerrainPyramid = navigator.Select(pyramidPath);
            while (interatorTerrainPyramid.MoveNext()) {
                // Get <ConnectivityRule>
                XPathNavigator navigatorTerrainPyramid = interatorTerrainPyramid.Current;
                TerrainPyramid terrainPyramid = new TerrainPyramid(navigatorTerrainPyramid);
                this._terrainPyramids.Add(terrainPyramid);
            }
            
            // <TerrainID></TerrainID>
            XPathNavigator navigatorTerrainID = navigator.SelectSingleNode("TerrainID");
            if (navigatorTerrainID != null) {
                this._terrainID = navigatorTerrainID.ValueAsInt;
            }

            // <Version></Version>
            XPathNavigator navigatorVersion = navigator.SelectSingleNode("Version");
            if (navigatorVersion != null) {
                this._version = navigatorVersion.ValueAsInt;
            }
        }
Example #30
0
 public RasterBand(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._oidFieldName = info.GetString("oidFieldName");
     this._isInteger = info.GetBoolean("isInteger");
     this._meanCellHeight = info.GetDouble("meanCellHeight");
     this._meanCellWidth = info.GetDouble("meanCellWidth");
     this._height = info.GetInt32("height");
     this._width = info.GetInt32("width");
     this._pixelType = (rstPixelType)Enum.Parse(typeof(rstPixelType), info.GetString("pixelType"), true);
     this._primaryField = info.GetInt32("primaryField");
     this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), info.GetString("tableType"), true);
     this._extent = (Extent)info.GetValue("extent", typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
 }