Example #1
0
        public RasterDef(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Description></Description>
            XPathNavigator navigatorDescription = navigator.SelectSingleNode("Description");
            if (navigatorDescription != null) {
                this._description = navigatorDescription.Value;
            }

            // <IsByRef></IsByRef>
            XPathNavigator navigatorIsByRef = navigator.SelectSingleNode("IsByRef");
            if (navigatorIsByRef != null) {
                this._isByRef = navigatorIsByRef.ValueAsBoolean;
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }
        }
Example #2
0
 public RasterDef(RasterDef prototype) : base(prototype) {
     this._description = prototype.Description;
     this._isByRef = prototype.IsByRef;
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
 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 #5
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);
            }
        }
Example #7
0
        public Extent(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // XMin
            XPathNavigator navigatorXMin = navigator.SelectSingleNode("XMin");
            if (navigatorXMin != null) {
                this._xMin = navigatorXMin.ValueAsDouble;
            }

            // YMin
            XPathNavigator navigatorYMin = navigator.SelectSingleNode("YMin");
            if (navigatorYMin != null) {
                this._yMin = navigatorYMin.ValueAsDouble;
            }

            // XMax
            XPathNavigator navigatorXMax = navigator.SelectSingleNode("XMax");
            if (navigatorXMax != null) {
                this._xMax = navigatorXMax.ValueAsDouble;
            }

            // YMax
            XPathNavigator navigatorYMax = navigator.SelectSingleNode("YMax");
            if (navigatorYMax != null) {
                this._yMax = navigatorYMax.ValueAsDouble;
            }

            // Spatial Reference
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference == null) {
                this._spatialReference = new SpatialReference();
            }
            else {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
        }
Example #8
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");
 }
Example #9
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 #10
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());
     }
 }
Example #11
0
 public Point(SerializationInfo info, StreamingContext context): base(info, context) {
     this._x = info.GetDouble("x");
     this._y = info.GetDouble("y");
     this._m = info.GetDouble("m");
     this._z = info.GetDouble("z");
     this._id = info.GetInt32("id");
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
     this._mAware = info.GetBoolean("mAware");
     this._zAware = info.GetBoolean("zAware");
     this._pointIDAware = info.GetBoolean("pointIDAware");
 }
 public SpatialReference(SpatialReference prototype) : base(prototype) {
     this._wkt = prototype.WKT;
     this._xOrigin = prototype.XOrigin;
     this._yOrigin = prototype.YOrigin;
     this._xyScale = prototype.XYSCale;
     this._zOrigin = prototype.ZOrigin;
     this._zScale = prototype.ZScale;
     this._mOrigin = prototype.MOrigin;
     this._mScale = prototype.MScale;
     this._xyTolerance = prototype.XYTolerance;
     this._zTolerance = prototype.ZTolerance;
     this._mTolerance = prototype.MTolerance;
     this._highPrecision = prototype.HighPrecision;
     this._leftLongitude = prototype.LeftLongitude;
 }
 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));
 }
 public GeometryDef(GeometryDef prototype) : base(prototype) {
     this._avgNumPoints = prototype.AvgNumPoints;
     this._geometryType = prototype.GeometryType;
     this._hasM = prototype.HasM;
     this._hasZ = prototype.HasZ;
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._gridSize0 = prototype.GridSize0;
     this._gridSize1 = prototype.GridSize1;
     this._gridSize2 = prototype.GridSize2;
 }
Example #15
0
 public RasterDef(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._description = info.GetString("description");
     this._isByRef = info.GetBoolean("isByRef");
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
 }
        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());
            }
        }
        //
        // 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));
                }
            }
        }
 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>));
 }
Example #19
0
 //
 // CONSTRUCTOR
 //
 public Point() : base() {
     this._spatialReference = new SpatialReference();
 }
 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 #21
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;
            }
        }
 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;
 }
        //
        // 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
 public Point(Point prototype) : base(prototype) {
     this._x = prototype.X;
     this._y = prototype.Y;
     this._m = prototype.M;
     this._z = prototype.Z;
     this._id = prototype.ID;
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._mAware = prototype.MAware;
     this._zAware = prototype.ZAware;
     this._pointIDAware = prototype.PointIDAware;
 }
 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;
     }
 }
Example #26
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>));
 }
 public GeometryDef(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._avgNumPoints = info.GetInt32(GeometryDef.AVGNUMPOINTS);
     this._geometryType = (esriGeometryType)Enum.Parse(typeof(esriGeometryType), info.GetString(GeometryDef.GEOMETRYTYPE), true);
     this._hasM = info.GetBoolean(GeometryDef.HASM);
     this._hasZ = info.GetBoolean(GeometryDef.HASZ);
     this._spatialReference = (SpatialReference)info.GetValue(GeometryDef.SPATIALREFERENCE, typeof(SpatialReference));
     this._gridSize0 = info.GetDouble(GeometryDef.GRIDSIZE0);
     this._gridSize1 = info.GetDouble(GeometryDef.GRIDSIZE1);
     this._gridSize2 = info.GetDouble(GeometryDef.GRIDSIZE2);
 }
Example #28
0
        public Point(IXPathNavigable path): base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <X></X>
            XPathNavigator navigatorX = navigator.SelectSingleNode("X");
            if (navigatorX != null) {
                this._x = navigatorX.ValueAsDouble;
            }

            // <Y></Y>
            XPathNavigator navigatorY = navigator.SelectSingleNode("Y");
            if (navigatorY != null) {
                this._y = navigatorY.ValueAsDouble;
            }

            // <M></M>
            XPathNavigator navigatorM = navigator.SelectSingleNode("M");
            if (navigatorM != null) {
                this._m = navigatorM.ValueAsDouble;
                this._mAware = true;
            }
            else {
                this._mAware = false;
            }

            // <Z></Z>
            XPathNavigator navigatorZ = navigator.SelectSingleNode("Z");
            if (navigatorZ != null) {
                this._z = navigatorZ.ValueAsDouble;
                this._zAware = true;
            }
            else {
                this._zAware = false;
            }

            // <ID></ID>
            XPathNavigator navigatorId = navigator.SelectSingleNode("ID");
            if (navigatorId != null) {
                this._id = navigatorId.ValueAsInt;
            }

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

            // <AvgNumPoints></AvgNumPoints>
            XPathNavigator navigatorAvgNumPoints = navigator.SelectSingleNode(Xml.AVGNUMPOINTS);
            if (navigatorAvgNumPoints != null) {
                this._avgNumPoints = navigatorAvgNumPoints.ValueAsInt;
            }

            // <GeometryType></GeometryType>
            XPathNavigator navigatorGeometryType = navigator.SelectSingleNode(Xml.GEOMETRYTYPE);
            if (navigatorGeometryType != null) {
                this._geometryType = (esriGeometryType)Enum.Parse(typeof(esriGeometryType), navigatorGeometryType.Value, true);
            }

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

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

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode(Xml.SPATIALREFERENCE);
            this._spatialReference = new SpatialReference(navigatorSpatialReference);

            // <GridSize0></GridSize0>
            XPathNavigator navigatorGridSize0 = navigator.SelectSingleNode(Xml.GRIDSIZE0);
            if (navigatorGridSize0 != null) {
                this._gridSize0 = navigatorGridSize0.ValueAsDouble;
            }

            // <GridSize1></GridSize1>
            XPathNavigator navigatorGridSize1 = navigator.SelectSingleNode(Xml.GRIDSIZE1);
            if (navigatorGridSize1 != null) {
                this._gridSize1 = navigatorGridSize1.ValueAsDouble;
            }

            // <GridSize2></GridSize2>
            XPathNavigator navigatorGridSize2 = navigator.SelectSingleNode(Xml.GRIDSIZE2);
            if (navigatorGridSize2 != null) {
                this._gridSize2 = navigatorGridSize2.ValueAsDouble;
            }
        }
 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;
 }