FgdbDataRow row = ... // #0) Geometry. Element tempElement = Element.FromShape( row.GetGeometry() ); // #1) Attributes. element.pProperties = new Property[10]; // #1-A) -> Current Option. for (int i = 1, icount = 10; i < icount; i++) { object value = null; switch (m_oFeatureClass.GetEsriPropertyType(field)) { case EsriPropertyType.esriFieldTypeInteger: { int valueT = 0; if (row.GetInteger(property.Name, ref valueT)) value = valueT; //-> ### 10 calls C#/C++ to Row::GetInteger! break; } ... } property.Value = value; } // #1-B) -> Proposed Option. byte[] pMstream = row.GetAttributesBuffer(); //-> One call! element.BufferAttribs = pMstream; ... for (int i = 1, icount = 10, offsetPos = 0; i < icount; i++) { // If I need de i-attributte. int value = BitConverter.ToInt32(element.BufferAttribs, offsetPos+=4); property.Value = value; }
while ((sr = SE_stream_fetch(stream1))== SE_SUCCESS) { if ((sr = SE_stream_execute(stream2)) != SE_SUCCESS) { /* handle write error */ } } if (sr != SE_FINISHED) { /* handle read error */ }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.