To test my code from previous post i prepared a code fragment
//for test
//may need some correction as was configured and modified on-the-fly from project
ISpatialReferenceFactory3 srFactory = new SpatialReferenceEnvironmentClass();
IProjectedCoordinateSystem pcs = srFactory.CreateProjectedCoordinateSystem(pcsType);
ISpatialReference spatialReference = (ISpatialReference)pcs;
ISpatialReferenceResolution srResolution = (ISpatialReferenceResolution)spatialReference;
srResolution.ConstructFromHorizon();
srResolution.SetDefaultMResolution();
srResolution.SetDefaultXYResolution();
srResolution.SetDefaultZResolution();
ISpatialReferenceTolerance srTolerance = (ISpatialReferenceTolerance)spatialReference;
srTolerance.SetDefaultMTolerance();
srTolerance.SetDefaultXYTolerance();
srTolerance.SetDefaultZTolerance();
IVerticalDatum verticalDatum = srFactory.CreateVerticalDatum((int)esriSRVerticalDatumType.esriSRVertDatum_SeaLevel);
IHVDatum hvDatum = verticalDatum as IHVDatum;
ILinearUnit unit = srFactory.CreateUnit((int)esriSRUnitType.esriSRUnit_Meter) as ILinearUnit;
IVerticalCoordinateSystemEdit vcsEdit = (IVerticalCoordinateSystemEdit)new VerticalCoordinateSystemClass();
int positive = 1;
double shift = 0;
vcsEdit.DefineEx("", "", "", "", "", hvDatum, unit, ref shift, ref positive);
((ISpatialReference3)spatialReference).VerticalCoordinateSystem = (IVerticalCoordinateSystem)vcsEdit;
ISpatialReferenceResolution sprefResolution = (ISpatialReferenceResolution)spatialReference;
sprefResolution.SetDefaultZResolution();
ISpatialReferenceTolerance srTolerance = (ISpatialReferenceTolerance)spatialReference;
srTolerance.SetDefaultZTolerance();
spatialReference.Changed();
System.Runtime.InteropServices.Marshal.ReleaseComObject(srFactory);
List<GeoReferencedModel> models=new List<GeoReferencedModel>();
models.Add(new GeoReferencedModel(path_to_model));
IWorkspaceFactory2 workspaceFactory = new FileGDBWorkspaceFactoryClass();
IWorkspaceName workspaceName = workspaceFactory.Create(System.IO.Path.GetDirectoryName(path_to_fileGDB), System.IO.Path.GetFileName(path_to_fileGDB), null, 0);
IName name = (IName)workspaceName;
IWorkspace workspace = (IWorkspace)name.Open();
System.Runtime.InteropServices.Marshal.ReleaseComObject(workspaceFactory);
System.Runtime.InteropServices.Marshal.ReleaseComObject(workspaceName);
Import3DFiles(path_to_fileGDB, "GeoReferencedObjects3D", models, spatialReference)
I see that the model causing error is large enough (kmz file 13Mb), and may be featureclass can't store such amount of information by igeometry field. If so is, so how i can analyze geometries of 3d files to prevent exceptions with attempts to store them? What is maximum size of such objects?
Can't to attach model file because of size restrictions. If you would like i can email it to you.
Would be very appreciative for your help.