workaround for some missing polygons in ogrdecode
- we clip by row first, then tile. when a polygon is clipped for a row, I can see all resulting polys, but subsequent tile intersection, the poly disappears. I am assuming that the colinear horizontal line causes clipper some difficulty. - workaround is to clip the row slightly larger, so when clipping each bucket, there won't be such perfect colinear lines. I ran a test rectangle around lowi (3x3 degrees, and saw no issue.
This commit is contained in:
parent
4f59886aaa
commit
082ee9b82f
1 changed files with 5 additions and 2 deletions
|
@ -103,8 +103,11 @@ void tgChopper::Add( const tgPolygon& subject, const std::string& type )
|
|||
// Generate a clip rectangle for the whole row
|
||||
|
||||
SGBucket b_clip = b_min.sibling(0, row);
|
||||
double clip_bottom = b_clip.get_center_lat() - SG_HALF_BUCKET_SPAN;
|
||||
double clip_top = b_clip.get_center_lat() + SG_HALF_BUCKET_SPAN;
|
||||
|
||||
// add a small offset when generating the row. clipper is having difficulty
|
||||
// with colinear horizontal lines...
|
||||
double clip_bottom = b_clip.get_center_lat() - 0.0630;
|
||||
double clip_top = b_clip.get_center_lat() + 0.0630;
|
||||
tgPolygon clip_row, clipped;
|
||||
|
||||
SG_LOG( SG_GENERAL, SG_DEBUG, " CLIPPED row " << row << " center lat is " << b_clip.get_center_lat() << " clip_botton is " << clip_bottom << " clip_top is " << clip_top );
|
||||
|
|
Loading…
Reference in a new issue