可以读取shapefile, 但是shapefile本身不含有topology,所以仍不能满足要求。
http://shapelib.maptools.org/shp_api.html
bool
NServerData::initShapeFile(){const char* shp = "shapefile/freeway_polyline.shp";
const char* shx = "shapefile/freeway_polyline.shx";
const char* right = "rb";
// read shp file
SHPHandle h = SHPOpen(shp, right);
int pnEntities;
int pnShapeType;
double padfMinBound;
double padfMaxBound;
SHPGetInfo( h, &pnEntities, &pnShapeType,
&padfMinBound, &padfMaxBound );
cout << "shape info:"
<< pnEntities << " "
<< pnShapeType << " "
<< padfMinBound << " "
<&