admin管理员组文章数量:1531792
2024年3月20日发(作者:)
for (j = 0; j<10; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--10
//****写Dest string
memset(media, '0', 40);
media[0] = '/';
for (int c = 1; c <32; c++)
media[c] = ' ';
for (j = 0; j<32; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--32
//****写Ec string
for (j = 0; j<16; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--16
//****写EcRm int
ss << -8888;
str = ();
length = ();
memset(media, '0', 40);
for (int m = 0; m < 10 - length; m++)
media[m] = ' ';
for (int c = 10 - length; c < 10; c++)
media[c] = str[c - 10 + length];
for (j = 0; j<10; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--10
//****写Elevt int
for (j = 0; j<10; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--10
//****写Cc int
str = polygon->objectAttribute;
memset(media, '0', 40);
length = ();
for (int c = 0; c < length; c++)
media[c] = str[c];
for (int c = length; c < 8; c++)
media[c] = ' ';
for (j = 0; j<8; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--8
//****写shape_length double
CString str1;
double shape_length = polygon->getAllLength();
(_T("%.11e"), shape_length);
memset(media, '0', 40);
media[0] = ' ';
for (int c = 1; c < 16; c++)
media[c] = str1[c - 1];
if (gth() == 18)
for (int c = 16; c < 19; c++)
media[c] = str1[c - 1];
else {
media[16] = '0';
media[17] = str1[15];
media[18] = str1[16];
}
//*(media + length ) = '0';
for (j = 0; j<19; j++)
fwrite(media + j, sizeof(char), 1, m_DbfFile_fp); //--19
//****写shape_Area double
double shape_area = polygon->shapeArea;
(_T("%.11e"), shape_area);
memset(media, '0', 40);
media[0] = ' ';
for (int c = 1; c < 16; c++)
media[c] = str1[c - 1];
if (gth() == 18)
for (int c = 16; c < 19; c++)
media[c] = str1[c - 1];
else {
media[16] = '0';
media[17] = str1[15];
media[18] = str1[16];
}
版权声明:本文标题:shp系列(六)——利用C++进行Dbf文件的写(创建) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1710902623a289500.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论