feat: add missing map features from arma3-maptiler#147
Conversation
Compared ocap2-web maptool against the original arma3-maptiler and ported missing features: - Generate sea polygons from DEM via gdal_contour -p, producing land/water polygons with ELEV_MAX filtering (was never generated, only grad_meh GeoJSON layers were processed) - Add land/sea as explicit layers in topo and topo-dark styles, positioned right after background with proper ELEV_MAX > 0 / <= 0 filters - Add 19 missing feature layer styles: mount, fortress, airport, bordercrossing, viewpoint, flag, rockarea, handdrawncamp, power, name, faketown, strategic, flatareacity, flatareacitysmall, strongpointarea, civildefense, culturalproperty, dangerousforces, safetyzone - Add layer name normalization (mounts → mount) for grad_meh naming differences - All new layers styled across default, topo, and topo-dark variants
Summary of ChangesHello @fank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the map rendering capabilities by introducing the generation and styling of sea polygons from DEM data, providing a more complete topographic representation. It also expands the range of displayed map features by adding styles for numerous previously unrendered points of interest and locations, improving the overall detail and utility of the generated maps. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant enhancements to the map generation process, including sea polygon generation from DEM, rendering of land/sea in topo styles, and support for 19 new feature layers. The code is well-organized and the new features are integrated cleanly. I have a couple of suggestions to improve logging for external commands and to refactor some duplicated code for better maintainability.
- Capture sea polygon command output in buffer via io.MultiWriter for diagnostic logging while preserving real-time output - Extract buildLandSeaLayers helper to deduplicate topo/topo-dark
Centralizes the io.MultiWriter pattern into a single runCmd() function in raster_tiles.go. All command invocations now stream output in real time while capturing it for diagnostic logging on failure.
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
Summary
gdal_contour -pwithELEV_MAX/ELEV_MINproperties. Previously only grad_meh GeoJSON layers were processed, so sea data was never available.ELEV_MAXfiltering to split land (#DFDFDF/#2a2a2a) from water (#36B/#1a3a5c).mount,fortress,airport,bordercrossing,viewpoint,flag,rockarea,handdrawncamp,power,name,faketown,strategic,flatareacity,flatareacitysmall,strongpointarea,civildefense,culturalproperty,dangerousforces,safetyzone— styled as text labels across all three style variants (default, topo, topo-dark).mounts→mountto handle grad_meh naming differences.Test plan
mountslayer now renders with mount style instead of generic fallback circle