Shapefile Export

nickgoodliffnickgoodliff Global Mapper UserPosts: 45Trusted User
edited May 2013 in SDK
I'm exporting some layers as shapefiles, which I do 3 times to get the lines, areas and points. Only the points export produces a .dbf file - any reason why this could be? Here is my code (C#):

GlobalMapperDLL.GM_ExportVectorEx(storagePath + "_Areas.shp",
GlobalMapperDLL.GM_VectorExportFormat_t32.GM_Export_Shapefile,
IntPtr.Zero,
ref ExportRect,
GlobalMapperDLL.GM_VectorExportFlags_t32.GM_VectorExportFlags_ExportAreas,
IntPtr.Zero,
"");
GlobalMapperDLL.GM_ExportVectorEx(storagePath + "_Lines.shp",
GlobalMapperDLL.GM_VectorExportFormat_t32.GM_Export_Shapefile,
IntPtr.Zero,
ref ExportRect,
GlobalMapperDLL.GM_VectorExportFlags_t32.GM_VectorExportFlags_ExportLines,
IntPtr.Zero,
"");
GlobalMapperDLL.GM_ExportVectorEx(storagePath + "_Points.shp",
GlobalMapperDLL.GM_VectorExportFormat_t32.GM_Export_Shapefile,
IntPtr.Zero,
ref ExportRect,
GlobalMapperDLL.GM_VectorExportFlags_t32.GM_VectorExportFlags_ExportPoints,
IntPtr.Zero,
"");

And the files I get are:

xxx_Areas.shp
xxx_Areas.shx
xxx_Lines.shp
xxx_Lines.shx
xxx_Points.shp
xxx_Points.shx
xxx_Points.dbf

Cheers
Nick

Comments

Sign In or Register to comment.