Commit Graph

159 Commits

Author SHA1 Message Date
Richard Fairhurst dbdb4da097 RestartRelations() to reset relation subscript (#548) 2023-10-09 11:30:03 +01:00
Richard Fairhurst 439c6b1027 Report OSM ID on Lua processing error (#535) 2023-09-18 14:22:36 +01:00
Richard Fairhurst 528aa25dec Support type=boundary relations as native multipolygons (#508) 2023-07-23 08:57:39 +01:00
holzgeist d3c46edacb fix: CMake build on Arch Linux (#503)
* added missing include
* set required C++ version to 17

Co-authored-by: Tobias Ollmann <tobias@holzgeist.at>
2023-07-16 13:32:06 +01:00
Richard Fairhurst 4a85c60e6d Compile-time option for float ZOrder (#486) 2023-03-31 15:10:30 +01:00
Richard Fairhurst 06e0b2820b Configurable sort order (#485) 2023-03-31 15:09:58 +01:00
Richard Fairhurst bf64cc3d21 Use rtree for large polygons (#479) 2023-03-25 23:16:37 +00:00
Richard Fairhurst 4937daee4b Use faster bbox-specialised clipping algorithm (#482) 2023-03-25 23:16:07 +00:00
Richard Fairhurst 334a99fab9 Ignore nodes in ways with --skip-integrity (#469) (#471) 2023-03-07 23:22:34 +00:00
Richard Fairhurst 571a997b37 Mask IDs so they're accurate (#470) 2023-03-07 23:12:46 +00:00
Fabrizio 57942b9812 Fixed application crashes (#441) 2022-10-29 14:18:40 +01:00
Richard Fairhurst bcba6cc984 Move "no indexed layer" error to verbose-only 2022-10-14 13:26:30 +01:00
Richard Fairhurst d33888c860 Remove spikes after simplification (#431)
* Only use polygon->clipping bbox logic at z14

* Remove spikes after simplification
2022-10-01 14:03:02 +01:00
Richard Fairhurst 9a2c0d5be2 Scale before simplifying (#428) 2022-09-27 20:53:40 +01:00
Richard Fairhurst ad1fcfbdf3 Support osmium locations-on-ways format (#386) 2022-02-26 16:58:44 +00:00
Richard Fairhurst 70f89d64ba Output slow geometry generation and allow user interrupt (#378) 2022-02-17 10:45:51 +00:00
Richard Fairhurst 1f9a564d02 High-resolution geometries at max zoom level (#384) 2022-02-17 10:44:10 +00:00
Richard Fairhurst 7c8e2e6995 Make relation scan thread-safe 2022-02-15 11:59:40 +00:00
systemed ef4b6e6635 No need to initialise empty vector 2022-02-07 09:00:16 +00:00
Richard Fairhurst 965f6ae349 (Non-multipolygon) relation support (#360) 2022-01-08 10:12:08 +00:00
Richard Fairhurst a8ee8a96cc Revert "Use artificial IDs for OutputObject after 1st use (#357)" (#359)
This reverts commit 962ad86bfa.
2022-01-05 00:22:16 +00:00
Richard Fairhurst 962ad86bfa Use artificial IDs for OutputObject after 1st use (#357) 2022-01-03 13:05:37 +00:00
Richard Fairhurst 27b3a7bc5e Write layer minzoom to objects (#351) 2021-10-26 11:03:11 +01:00
Richard Fairhurst 80b4792be4 Minor build fixes (#350)
* Minor Makefile adjustments

* Silence warning by stating proto2 syntax
2021-10-25 12:35:06 +01:00
systemed 75ea4cbcaa Resize used_ways list less often 2021-10-08 14:30:39 +01:00
systemed 0dd85fb063 Add flag to disable integrity check 2021-10-05 20:30:02 +01:00
Michael Reichert 37311d4165 Do not write layers with write_to attribute to metadata.json (#330) 2021-10-04 09:58:34 +01:00
Richard Fairhurst 0f814978d8 Don't use batched used_ways insert (#333) 2021-10-04 08:26:26 +01:00
Wouter van Kleunen 3f8b4e2f60 Handle nan condition in lua (#329) 2021-09-27 17:35:17 +01:00
Wouter van Kleunen 581838d1a7 Fast shutdown (#320) 2021-09-20 10:51:33 +01:00
Richard Fairhurst b45219ff91 Use real relation IDs rather than --newWayID (#318) 2021-09-13 22:42:44 +01:00
Richard Fairhurst f45032dce6 Only add ways used by relations to the store (#292) 2021-09-13 22:41:15 +01:00
Wouter van Kleunen 474e8bb852 Rely on provided rapidjson dependency + cmake (#306)
* Rely on packaged rapidjson dependency

* Add rapidjson to cmake

* Add -pthread option to LIB flags variable in Makefile.

* Allow environment setting of CXXFLAGS.

* Avoid git during build

* Github CI build using ubuntu 18.04

Co-authored-by: Felix Delattre <felix@delattre.de>
2021-09-10 14:01:59 +01:00
Wouter van Kleunen a9a54f97ee Several optimization to reduce outputobject size (#307)
* Pack OutputObject bitfields more efficiently

* Move to plain enum to keep GCC happy

* Convert int40 to string

* Cast bitfield as a full int for logging

* Make enum names unique, because Windows

* Fake relation id shouldn't overtop the bitfield

* Pack into 36 bytes

* Improved simplify performance (#279)

* Remove reference counted outputobject

* Use OsmID to lookup generated geometry

* Remove temporary when assigning multipolygon

* Make attribute store ref an intrusive pointer

Co-authored-by: systemed <richard@systemeD.net>
2021-09-10 12:25:50 +01:00
systemed 432f394922 Use deque when assembling multipolygons 2021-08-24 11:56:02 +01:00
Wouter van Kleunen 0267290013 Close mmap file before deleting (#267) 2021-08-23 14:59:55 +01:00
Michael Reichert ca0fd702c3 Add z_order sorting support (#283)
* Add support for a z_order field and sort output objects by z_order

PostGIS import tools like Osm2pgsql and Imposm can write a z_order field
to the database table in order to allow map styles to render features
ordered by road class and vertical layer. Tilemaker now gets a Lua
callback to set the z_order for an OSM object (default 0) and will sort
the vectortile features by z_order. z_order is also taken into account
for combining of features. z_order values are limited to 1-byte unsigned
integer.

* Document new ZOrder callback function

* Drop unnecessary variable

* Implement z_order sorting for the OpenMapTiles example config

This commit also adapts the minimum zoom levels to the lastest version.
2021-08-23 13:37:24 +01:00
Wouter van Kleunen 017e671036 Return compact mode (#286)
* Return compact mode

* Deallocate memory allocated in other thread
2021-08-23 11:37:05 +01:00
Richard Fairhurst aa1398ff51 Tidy logging 2021-07-02 14:45:50 +01:00
Wouter van Kleunen 3b11dff4bb Perform dissolve on self-intersecting polygons (#249) 2021-06-22 11:37:36 +01:00
Wouter van Kleunen 631864ab5a Parallel loading of osm.pbf file (#243)
* Parallel reading

* Fix win build

* Simplifier correctly init nodes

* Use generator to open input file(s)

* Bit more consistent naming of osm_store files

* Make number of locks in attribute store function of number of threads

* Small optimization, don't use virtual method calls

* Restore nodeListPolygon correct

* Don't drop self intersecting polygons
2021-06-06 13:02:41 +01:00
Wouter van Kleunen 0f2c6057b7 Non self-intersecting simplify (#239) 2021-05-21 20:56:29 +01:00
Wouter van Kleunen 12b34febc7 Use dynamic bbox to prevent clipping of edges passing tile border (#234) 2021-05-05 09:23:09 +01:00
Richard Fairhurst ead23531c4 Add :Centroid method to get lat/lon from Lua (#230) 2021-04-26 18:47:10 +01:00
Richard Fairhurst a73723702b Refactor shapefile spatial queries (#228) 2021-04-26 14:48:19 +01:00
Richard Fairhurst 713ff5079a Grow store size more conservatively (#227) 2021-04-24 10:21:15 +01:00
Wouter van Kleunen bda4b382dc Don't generate tiles outside bounding box (#224) 2021-04-18 15:37:33 +01:00
Richard Fairhurst d400f0b6c8 Merge tile contents (#225) 2021-04-18 14:07:27 +01:00
Richard Fairhurst 72c8325a41 Per-layer option to merge polygons (#223) 2021-04-13 11:26:44 +01:00
Wouter van Kleunen cb261f5703 Cleanup to tile coordinates generation (#222) 2021-04-11 15:54:21 +01:00