Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Error of COgrLayer::LoadShapefile() #160

Closed
wangxiya opened this issue Apr 14, 2019 · 2 comments
Closed

The Error of COgrLayer::LoadShapefile() #160

wangxiya opened this issue Apr 14, 2019 · 2 comments
Assignees

Comments

@wangxiya
Copy link

wangxiya commented Apr 14, 2019

The error of COgrLayer::LoadShapefile()

old version:

IShapefile* COgrLayer::LoadShapefile()
{ 
	bool isTrimmed = false;	

	IShapefile* sf = Ogr2Shape::Layer2Shapefile(_layer, _activeShapeType, _loader.GetMaxCacheCount(), isTrimmed, &_loader, _globalCallback);
	if (isTrimmed) {
		ErrorMessage(tkOGR_LAYER_TRIMMED);
	}
	return sf;
}

new version:

IShapefile* COgrLayer::LoadShapefile()
{ 
	bool isTrimmed = false;	
	ShpfileType shpType;
	get_ShapeType(&shpType);

	shpType = shpType != SHP_NULLSHAPE ? shpType : _activeShapeType;

	IShapefile* sf = Ogr2Shape::Layer2Shapefile(_layer, shpType, _loader.GetMaxCacheCount(), isTrimmed, &_loader, _globalCallback);
	if (isTrimmed) {
		ErrorMessage(tkOGR_LAYER_TRIMMED);
	}
	return sf;
}

I don't know whether I modify correctly!

@pmeems
Copy link
Contributor

pmeems commented Apr 25, 2019

I saw you made pull request #161
I've asked @jerryfaust to review.

@mathijs-dumon
Copy link
Contributor

Closing as the pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants