Commit Graph

34 Commits

Author SHA1 Message Date
Eric Fischer
1f8b6faec8 Simplify lines consistently on opposite sides of tile boundaries 2016-01-07 11:35:11 -08:00
Eric Fischer
f43d18eb73 Bring back the old simple polygon clipping algorithm 2016-01-04 17:31:33 -08:00
Eric Fischer
228a4d6bb9 Make the geometric origin a per-reader property for thread safety 2015-12-22 16:58:27 -08:00
Eric Fischer
cf279940da Don't simplify "unused" movetos from points. Don't write empty geometries. 2015-12-11 12:34:55 -08:00
Eric Fischer
f04c5e153a Avoid arithmetic overflow in area calculation 2015-12-09 15:02:59 -08:00
Eric Fischer
4bde17f8ff Remove unnecessary coordinate offsetting. Negative coordinates are OK. 2015-12-08 17:21:59 -08:00
Eric Fischer
dace304182 Offset coordinates for Clipper to keep them positive.
Limit very high or low latitudes and longitudes.
2015-12-08 16:24:17 -08:00
Eric Fischer
36f4f77640 Another polygon fix: if the outer ring was dropped, drop its inner rings too 2015-11-02 11:43:44 -08:00
Eric Fischer
358e9cad5b Use closepath for each polygon ring to match the vector tile spec 2015-10-28 14:34:57 -07:00
Eric Fischer
e554a121fb Fix formatting 2015-10-20 12:03:49 -07:00
Eric Fischer
f64e2c94e2 Let Clipper clean up polygons again after scaling and simplification 2015-10-15 17:11:29 -07:00
Eric Fischer
6a1895547d Reduce minimum polygon size for less blocky appearance 2015-10-14 15:51:11 -07:00
Eric Fischer
592c47c549 Fix signedness warnings 2015-10-14 12:24:18 -07:00
Eric Fischer
2b25c2fe3e Use Clipper for polygon clipping instead of my own implementation 2015-10-13 17:25:01 -07:00
Eric Fischer
329f041bf2 Remove closepath expectation in polygon thinning 2015-10-07 17:11:58 -07:00
Eric Fischer
5dc9f50345 Clean up polygon generation and clipping. Make sure winding order is correct. 2015-10-07 16:52:52 -07:00
Eric Fischer
18cdcb0732 Drop linetos smaller than tile resolution before doing normal simplification
Since simplification is rather expensive
2015-07-01 12:16:50 -07:00
Eric Fischer
a185073f0a Shrink the geometry by shaving off bits below the maxzoom tile resolution 2015-06-18 14:16:16 -07:00
Eric Fischer
1a44538bdf Use the first coordinates of the first feature as the origin for deltas 2015-06-18 10:52:01 -07:00
Eric Fischer
46626e4f08 Delta encoding for motion within features 2015-06-17 17:48:29 -07:00
Eric Fischer
8a1f0d83e1 Consistent indent style with clang-format 2015-06-03 11:22:13 -07:00
Eric Fischer
105dfa73d7 Use bounding box for quick accept/reject before detailed clipping. 2014-12-11 13:34:50 -08:00
Eric Fischer
380550ce85 Remember to remove the closepath after clipping away a polygon 2014-12-04 14:54:11 -08:00
Eric Fischer
b7b476b36c Don't introduce bogus geometries in clipped-away features. 2014-12-03 16:30:35 -08:00
Eric Fischer
08ff40e42f Trying to follow Vlad's suggestion and work from the top down.
Doesn't quite work yet, but seems like the right thing to do.
From the bottom up, indexing is a mess because of the buffering,
and includes unneeded areas in the bounding boxes of big features.
2014-12-03 16:18:43 -08:00
Eric Fischer
eaeb55bf71 Distinguish between signed and unsigned in the temporary file 2014-12-02 18:03:07 -08:00
Eric Fischer
1aea522ef5 Fix another overflow that broke line clipping at zoom level 1. 2014-11-07 12:51:26 -08:00
Eric Fischer
241d96e57c Save a few more bytes per geometry in the temporary file
by using bytes instead of ints for the drawing operations
2014-11-05 14:37:54 -08:00
Eric Fischer
a09bf3469d Fix line clipping overflow bug 2014-10-27 14:24:11 -07:00
Eric Fischer
3cd6fcfbe0 Add option to set buffer size. Pass it through to clipping functions. 2014-10-27 13:20:17 -07:00
Eric Fischer
9bb4a549ca Silence warnings about unused variables 2014-10-24 17:24:04 -07:00
Eric Fischer
46100c34df Move projection and tile arithmetic to its own file 2014-10-24 17:22:14 -07:00
Eric Fischer
754dbf152a Remove dead code 2014-10-24 15:23:35 -07:00
Eric Fischer
17384d5da7 Move geometric transformations into their own file 2014-10-24 15:12:02 -07:00