Commit Graph
95 Commits
Author SHA1 Message Date
Eric Fischer 028fef470e Fix the major bug: forgetting to offset back to world coordinates 2014-12-04 14:08:36 -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 a1e7426956 Sprinkle consts and casts to make it valid C++ as well as C 2014-12-02 14:17:49 -08:00
Eric Fischer cc58588724 More sensible error message when there are no valid geometries 2014-11-24 22:50:12 -08:00
Eric Fischer ffe4c95376 Calculate point dropping during encoding instead of tiling
so it is consistent across tile boundaries, and so every point
that exists at zoom x always also exists at zoom x+1.
2014-11-14 12:42:50 -08:00
Eric Fischer 8210f83912 Make the progress indicator less chatty 2014-11-13 10:48:59 -08:00
Eric Fischer 5595a087c7 Quick reject by bounding box of linear features too small to draw 2014-11-12 15:57:45 -08:00
Eric Fischer 2b6ad9968f Add a flag to exclude all properties except ones explicitly named 2014-11-12 12:41:56 -08:00
Eric Fischer b05c5a9583 Skip over properties with null values instead of considering it an error 2014-11-12 12:19:39 -08:00
Eric Fischer ea292def47 Make duplicate trimming less bad: only trim features indexed >1 time 2014-11-06 11:27:10 -08:00
Eric Fischer 7f6a5dc005 The maxzoom=0 case couldn't have worked 2014-11-06 11:05:09 -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 c24cfada61 Move feature type to index so point skipping can avoid looking up geometry
Which should avoid having to page the geometry in if there is
more data than will fit in memory
2014-11-05 12:18:03 -08:00
Eric Fischer bc4527b25d Add an option to set the directory for the temporary files 2014-11-05 10:34:44 -08:00
Eric Fischer a039aca860 Read-only memory map for merging, since there's no reason to write 2014-11-04 10:08:30 -08:00
Eric Fischer 3e3fdcbab4 Bring over the multistage sort from datamaps to avoid Mac crashes 2014-11-03 22:47:41 -08:00
Eric Fischer 984ac17d6c Use the same default ground precision whatever the base zoom is. 2014-10-27 14:36:13 -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 4cb56a6b11 The indexing side of buffering features at the edges of tiles 2014-10-27 12:56:51 -07:00
Eric Fischer 4b171c74b7 Constrain calculated center point to be within the bounding box
It could come out bigger because it is calculated from the center
of the densest tile, not actually the centroid.
2014-10-26 13:12:29 -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 3bdcc3ca90 Heavy-handedly fix clipping errors at the edges of z0 and z1 tiles 2014-10-15 17:03:30 -07:00
Eric Fischer 43b27e2dfd Don't closepath twice in multipolygons 2014-10-15 16:30:33 -07:00
Eric Fischer dc3c6138d1 Fix failure to close polygons. 2014-10-15 16:15:24 -07:00
Eric Fischer e561931d53 Fix bug that would always index for z14 regardless of actual max zoom 2014-10-15 15:49:03 -07:00
Eric Fischer ac34a292e9 Add an flag to remove all properties and use only geometry 2014-10-09 15:11:43 -07:00
Eric Fischer 65ec829de6 Report every 10000 features on input, since parsing GeoJSON is slow. 2014-10-09 12:23:43 -07:00
Eric Fischer adbd9f6edb Add a flag to select the rate at which points are dropped at low zooms. 2014-10-07 13:54:13 -07:00
Eric Fischer 8f71604fe6 If reading from standard input, use the .mbtiles as default layer name 2014-10-07 12:02:12 -07:00
Eric Fischer bda20fe8a6 Improve error reporting 2014-10-06 10:55:40 -07:00
Eric Fischer 41447a4678 Be clearer about error reporting 2014-10-04 14:11:59 -07:00
Eric Fischer b292b66a7c Fix more (small) memory leaks 2014-10-01 10:33:22 -07:00
Eric Fischer f0d2dbd2a8 Add -f option to overwrite existing mbtiles file 2014-09-29 15:09:21 -07:00
Eric Fischer 26e9feda02 Move mbtiles code to its own source file 2014-09-29 12:48:58 -07:00
Eric Fischer 5e64040859 Remove dead code 2014-09-29 12:18:58 -07:00
Eric Fischer 8118c13a71 Give the constant pool its own source file 2014-09-29 12:17:35 -07:00
Eric Fischer fabeb4588d Stop duplicating pool initialization code 2014-09-29 12:12:54 -07:00
Eric Fischer 5ab7f89465 Add an option to exclude specified properties 2014-09-29 10:50:24 -07:00
Eric Fischer c326762b6f Crunch out spaces and most punctuation from autogenerated layer names 2014-09-27 09:39:20 -07:00
Eric Fischer 6edaaa1104 Restrict to one input file, since that's all that will work 2014-09-26 14:33:03 -07:00
Eric Fischer 0a8420cc2e Add options to specify the base and low-zoom level of detail 2014-09-26 10:52:19 -07:00
Eric Fischer 528e0575e2 Actually write tiles directly to the .mbtiles file! 2014-09-25 16:34:17 -07:00
Eric Fischer ce485148fe String formatting mess to encode the JSON metadata 2014-09-25 16:07:03 -07:00
Eric Fischer 86f4f2dd05 More metadata adding, and boilerplate from mbutil 2014-09-25 15:38:20 -07:00
Eric Fischer eec0e14447 Start putting data into mbtiles instead of separate files 2014-09-25 15:20:17 -07:00
Eric Fischer e722ee487e More useful progress indicator 2014-09-25 14:36:25 -07:00
Eric Fischer 201708f19c Add command line options for zoom, title, layer name, name, output dir 2014-09-25 12:09:31 -07:00
Eric Fischer 0b23e65803 Hardcode layer name a little less. 2014-09-24 23:22:14 -07:00