IGxLayer gxLayerCls = new ESRI.ArcGIS.Catalog.GxLayer(); IGxFile gxFile = (ESRI.ArcGIS.Catalog.IGxFile)gxLayerCls; //Explicit Cast. gxFile.Path = strFile2BLoadedAsFeatLayerInParam; _pMxDoc.AddLayer(gxLayerCls.Layer); //Works GREAT TILL the above line. IFeatureLayer2 featLayer2BReprojected = new FeatureLayerClass(); featLayer2BReprojected = (IFeatureLayer2)_pMxDoc.FocusMap.get_Layer(0); ISpatialReferenceFactory pSpatialRefFact = new SpatialReferenceEnvironment(); ISpatialReference4 pSpatialRef ; //= new SpatialReferenceEnvironmentClass. IGeographicCoordinateSystem2 pGeogCoordSysNAD83_4269 = (IGeographicCoordinateSystem2); pSpatialRefFact.CreateGeographicCoordinateSystem(4269); IGeoDataset pGeoDataset = (IGeoDataset)featLayer2BReprojected.FeatureClass; //THIS pGeoDataset is empty. STOPPED HERE. IGeoDatasetSchemaEdit2 pGeoDSSchema = (IGeoDatasetSchemaEdit2)pGeoDataset; pGeoDSSchema.AlterSpatialReference(pGeogCoordSysNAD83_4269);
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.