Eric Fischer
f1b3f6d231
Fix warnings about shadowed variables
2016-05-03 15:48:42 -07:00
Eric Fischer
5775d088eb
Get rid of the strdup for attribution
2016-05-03 11:40:36 -07:00
Eric Fischer
9fcd079084
Add a test from the tile-join example
2016-05-03 11:30:53 -07:00
Eric Fischer
d712edcdc9
Stop using strdup for tile-join matching
2016-05-03 11:14:09 -07:00
Eric Fischer
271ec3d154
Stop using malloc for layer names
2016-05-03 10:52:49 -07:00
Eric Fischer
68c3bafab0
Merge pull request #234 from mapbox/clipper-update
...
Update clipper to 9edc2924e39:
2016-05-02 16:31:10 -07:00
Eric Fischer
1aac686670
Update clipper to 9edc2924e39:
...
commit 9edc2924e39266d70774b0ed0e07329a95e76f10
Author: Blake Thompson <flippmoke@gmail.com >
Date: Mon May 2 14:45:21 2016 -0400
Updated to prevent segfault in case where specific iterator was being deleted
and therefore, the range second no longer existed.
2016-05-02 16:23:08 -07:00
Eric Fischer
364450ad4c
Merge pull request #233 from mapbox/overflow
...
Make better use of the C++ standard library
2016-04-28 16:41:18 -07:00
Eric Fischer
023ce03672
Fix indentation and bump version number
2016-04-28 15:11:57 -07:00
Eric Fischer
adc70341ad
Use std::set to track the layer-wide feature attribute types.
...
Track them during parsing, not tiling. Remove the old string pool code.
2016-04-28 14:59:58 -07:00
Eric Fischer
87b90a5033
Use std::set to track included and excluded feature properties
2016-04-28 12:57:03 -07:00
Eric Fischer
f75d9e0dd4
Avoid needlessly constructing a temporary string
2016-04-28 12:46:40 -07:00
Eric Fischer
444de1f086
Get rid of malloc around layer names
2016-04-28 12:20:51 -07:00
Eric Fischer
3f0904cce8
Use std::string instead of malloc strings to make mbtiles metadata
2016-04-28 11:56:30 -07:00
Eric Fischer
40a6b7b37a
Another attempt to ensure that string hashing can't overflow
2016-04-28 11:52:16 -07:00
Eric Fischer
5490f3e15f
Fix numeric overflow
2016-04-28 11:52:09 -07:00
Eric Fischer
666565e820
Merge pull request #232 from mapbox/cplusplus
...
Convert everything to C++
2016-04-27 15:52:05 -07:00
Eric Fischer
744915025d
Restore dependency on headers in subdirectories
2016-04-27 15:41:40 -07:00
Eric Fischer
2b393ad8e5
Move jsonpull into a subdirectory like other included libraries
2016-04-27 15:33:30 -07:00
Eric Fischer
48a82039ce
Oops, I didn't check main.cpp in.
2016-04-27 15:14:09 -07:00
Eric Fischer
24db559f0b
Fix complaint about duplicate #define
2016-04-27 15:12:03 -07:00
Eric Fischer
c4274303ea
Fix indentation
2016-04-27 15:10:26 -07:00
Eric Fischer
ee97e6c307
Whittle down tile.hpp to the things that actually related to tile.cpp
2016-04-27 15:09:06 -07:00
Eric Fischer
3662f1a66b
Split main program functions apart from GeoJSON parsing
2016-04-27 14:59:20 -07:00
Eric Fischer
a52733eb07
Use protozero functions for zigzag encoding and decoding
2016-04-27 14:22:44 -07:00
Eric Fischer
f3b9e15267
Move serialization code to its own file
2016-04-27 14:19:10 -07:00
Eric Fischer
65253cba50
Drag header files into C++
2016-04-27 14:00:14 -07:00
Eric Fischer
a57c247508
Don't try to reindent Clipper and Protozero
2016-04-27 13:55:28 -07:00
Eric Fischer
7b0bb9a443
Drag the main function and GeoJSON parsing into C++
2016-04-27 13:54:00 -07:00
Eric Fischer
3f3a341c0a
Drag constant pool handling into C++
2016-04-27 12:44:46 -07:00
Eric Fischer
3d56a56464
Drag memory-mapped file handling into C++
2016-04-27 12:41:49 -07:00
Eric Fischer
fb9f3b6068
Drag tileset enumeration into C++
2016-04-27 12:40:19 -07:00
Eric Fischer
575072bb2f
Drag projection math into C++
2016-04-27 12:39:21 -07:00
Eric Fischer
94db232a89
Drag mbtiles handling into C++
2016-04-27 12:38:04 -07:00
Eric Fischer
d32d4bb35f
No need for line clipping to have its own source file
2016-04-27 12:36:51 -07:00
Eric Fischer
b12413eddb
Rename everything from .cc to .cpp to match other projects
2016-04-27 12:22:47 -07:00
Eric Fischer
8c7ac58ba1
Fix memory leaks and questionable arithmetic
...
Fix memory leaks and questionable arithmetic
2016-04-27 12:11:24 -07:00
Eric Fischer
737ae44dd7
Fix warnings about questionable numeric operations
2016-04-27 11:57:46 -07:00
Eric Fischer
d4504da2f5
Rationalize the highest allowed maxzoom in terms of detail
2016-04-27 11:46:24 -07:00
Eric Fischer
87fea8082f
Make indent, and finish writing a comment that I started
2016-04-27 10:51:54 -07:00
Eric Fischer
5cfd7cf68f
Don't leak layer names
2016-04-27 10:46:01 -07:00
Eric Fischer
1e16eb9294
Don't leak whatever is left of one parse tree when starting another
2016-04-27 10:45:55 -07:00
Eric Fischer
39c180a673
Don't leak the non-GeoJSON objects in the JSON parse tree
2016-04-27 10:45:41 -07:00
Eric Fischer
60318e664e
Fix leak of pools for -x and -y options
2016-04-27 10:45:33 -07:00
Eric Fischer
6a37ea4e54
Fix leaks of input source lists and bounding boxes
2016-04-27 10:45:25 -07:00
Eric Fischer
0205086886
Fix memory leak of temporary filenames
2016-04-27 10:45:17 -07:00
Eric Fischer
bd5dc4ad18
Merge pull request #187 from mapbox/earcut-polygon
...
Upgrade Clipper to 07b828b1 to fix self-intersecting polygons
2016-04-26 14:26:10 -07:00
Eric Fischer
77bc24d743
Bump version number
2016-04-26 14:16:19 -07:00
Eric Fischer
bebb0dda90
Add missing #include
2016-04-26 14:01:59 -07:00
Eric Fischer
49d29ad368
But no, I still left a few more dependencies
2016-04-26 13:54:08 -07:00
Eric Fischer
33f9d91a4c
Remove protobuf prerequisites again
2016-04-26 13:50:08 -07:00
Eric Fischer
a9a14b33e0
Merge remote-tracking branch 'origin/master' into earcut-polygon
2016-04-26 13:48:03 -07:00
Eric Fischer
8c82ee4c5f
Merge branch 'master' into earcut-polygon
...
Conflicts:
tile.cc
2016-04-26 12:09:56 -07:00
Eric Fischer
d72639b8f7
Merge pull request #219 from mapbox/protozero
...
Use protozero for reading and writing vector tile protocol buffers
2016-04-25 17:00:32 -07:00
Eric Fischer
aaec2c98b6
Clearer names
2016-04-25 16:52:20 -07:00
Eric Fischer
52f2804122
Make lexical feature ordering work again, and add a test for it
2016-04-25 16:47:30 -07:00
Eric Fischer
e10a71e152
Use the mvt constant pool when tiling
2016-04-25 16:19:52 -07:00
Eric Fischer
7bb4c7dbe9
Add a helper method to manage the tile layer's key-value constant pool
2016-04-25 14:20:21 -07:00
Eric Fischer
2dea1d1564
Fix hardwired layer version number
2016-04-25 12:23:40 -07:00
Eric Fischer
23934166b1
Methods instead of functions
2016-04-25 12:13:52 -07:00
Eric Fischer
2afd0bf31b
Try with clang++ instead
2016-04-25 10:22:14 -07:00
Eric Fischer
4e71c40f54
Try backing off to older C++ standard for older g++
2016-04-25 09:58:36 -07:00
Eric Fischer
03d5c89742
These are version 2 tiles
2016-04-25 09:24:36 -07:00
Eric Fischer
9e9afb06d2
Fix signedness warnings, missing #includes, and code formatting.
2016-04-22 23:32:02 -07:00
Eric Fischer
b15956b476
Oops, was still linking to -lprotobuf-lite
2016-04-22 19:30:37 -07:00
Eric Fischer
4cee508e95
Add missing #include
2016-04-22 17:51:35 -07:00
Eric Fischer
135aea8527
Use protozero for writing tiles
2016-04-22 17:45:24 -07:00
Eric Fischer
5ec41d7bbb
Use protozero for tile decoding
2016-04-22 17:10:33 -07:00
Eric Fischer
f9c4fb8374
Factor out tile reading and writing from tile-join
2016-04-22 15:47:06 -07:00
Eric Fischer
f837577b38
Rename pb_ prefixes to mvt_
2016-04-22 15:10:16 -07:00
Eric Fischer
358f019372
Factor out vector tile writing
2016-04-22 15:06:26 -07:00
Eric Fischer
f902721dab
Abstraction of tile decoding
2016-04-22 13:27:03 -07:00
Eric Fischer
b91e8f6d3e
Start factoring out protocol buffer handling code
2016-04-22 12:00:19 -07:00
Eric Fischer
2607a76c63
Merge pull request #215 from mapbox/no-clipping
...
Add an option not to clip features if they appear in the tile at all
2016-04-21 10:36:51 -07:00
Eric Fischer
ea638914ce
Add an option not to clip features and to include each exactly once per zoom
2016-04-20 15:06:43 -07:00
Eric Fischer
41099ed731
Don't add extra points at tile boundaries if not clipping
...
The extra points kept the features from being exactly the same
in each tile.
2016-04-19 16:13:02 -07:00
Eric Fischer
56d8178a7c
Fix a mistake in the formatting of the Usage message
2016-04-19 15:35:58 -07:00
Eric Fischer
24f401da52
Add an option not to clip features if they appear in the tile at all
2016-04-19 15:32:58 -07:00
Eric Fischer
62a74afbdc
Remember to do floating point division in pnpoly
2016-04-19 12:28:49 -07:00
Eric Fischer
694fa8ee97
Merge pull request #213 from mapbox/polygon-coalesce
...
Clean up polygon geometry again after coalescing
2016-04-18 16:15:13 -07:00
Eric Fischer
45cddc57bb
Simplify coordinates to avoid cross-platform rounding errors
2016-04-18 16:10:08 -07:00
Eric Fischer
86b8567201
Clean up polygon geometry again after coalescing
2016-04-18 15:53:04 -07:00
Eric Fischer
04c56320d2
Merge branch 'master' into earcut-polygon
...
Conflicts:
geometry.cc
2016-04-14 16:21:56 -07:00
Eric Fischer
2a6e41126f
Merge pull request #212 from mapbox/limitfiles
...
Speculatively open files to avoid overrunning the system limits
2016-04-14 10:32:19 -07:00
Eric Fischer
81517a0cb4
Fix tracking of number of available file descriptors
2016-04-14 10:20:28 -07:00
Eric Fischer
732a51d684
Fix the option for testing radix sort
...
Add a check to make sure I don't make the same mistake again
2016-04-14 10:06:01 -07:00
Eric Fischer
222735004d
Add a sanity check to make sure I remember to close all open files
2016-04-13 20:33:01 -07:00
Eric Fischer
137bb46db5
Clean up the maximum-files-open check a little
2016-04-13 20:20:25 -07:00
Eric Fischer
cae20bb5e6
Speculatively open files to avoid overrunning the system limits
2016-04-13 18:05:24 -07:00
Eric Fischer
7c9bd5da2f
Merge pull request #210 from mapbox/block-input
...
Don't let the input buffer for parallel streaming input get too big.
2016-04-13 13:31:51 -07:00
Eric Fischer
fbcb00fee9
Add an option to set the tileset's attribution
2016-04-13 12:49:41 -07:00
Eric Fischer
4dba8b3f70
Update clipper to 381c817fd13e8
2016-04-13 10:18:32 -07:00
Eric Fischer
cb4a83776e
Fix log formatting
2016-04-12 16:52:46 -07:00
Eric Fischer
e5461b1863
Additional debug output from polygon checking
2016-04-12 16:40:03 -07:00
Eric Fischer
3a46c05b46
Fix the progress indicator
2016-04-12 10:59:06 -07:00
Eric Fischer
968c94a409
Quiet warning about potentially uninitialized variable.
2016-04-11 16:43:46 -07:00
Eric Fischer
efe66dcafe
Use stdio instead of mmap for geometry while tiling to reduce thrashing
2016-04-11 15:59:02 -07:00
Eric Fischer
c6d2988485
Logic may be clearer this way
2016-04-11 14:51:04 -07:00
Eric Fischer
e846b11ce7
Don't let the input buffer for parallel streaming input get too big.
2016-04-11 13:51:28 -07:00
Eric Fischer
9d48d6a93d
Merge pull request #208 from mapbox/simplify-crash
...
Fix a line simplification crash when a segment degenerates to a single point
2016-04-07 16:50:01 -07:00