[isolines] Filter geom3 closed degenerate and too small isolines #5624

Merged
root merged 1 commit from pastk-topo-filter-isolines into master 2023-08-03 18:51:17 +00:00
Owner

The topography generator tool part from #5556.

Requires re-generation of *.isolines files to take effect.

The topography generator tool part from #5556. Requires re-generation of `*.isolines` files to take effect.
vng (Migrated from github.com) reviewed 2023-07-30 12:59:13 +00:00
vng (Migrated from github.com) commented 2023-07-30 12:56:21 +00:00

This logic is valid for areas, but I doubt for lines. So we skip all long A-B-A lines? Better keep A-B or every use-case is unique?

Maybe it is valid for isolines, but let us assume that we have say fence from OSM like A-B-A (mistakenly drawn).

This logic is valid for areas, but I doubt for lines. So we skip all long A-B-A lines? Better keep A-B or every use-case is unique? Maybe it is valid for isolines, but let us assume that we have say fence from OSM like A-B-A (mistakenly drawn).
vng (Migrated from github.com) commented 2023-07-30 12:53:53 +00:00

Can we put CHECK_GREATER(contourSimple.size(), 1, ()); here?

Can we put CHECK_GREATER(contourSimple.size(), 1, ()); here?
vng (Migrated from github.com) commented 2023-07-30 12:53:05 +00:00

nit: Looks like this comment is outdated. We filter here all closed degenerated lines.

nit: Looks like this comment is outdated. We filter here all closed degenerated lines.
pastk reviewed 2023-07-30 13:06:50 +00:00
Author
Owner

nope, SimplifyPoints() can return an empty contourSimple

nope, SimplifyPoints() can return an empty contourSimple
vng (Migrated from github.com) reviewed 2023-07-30 13:09:12 +00:00
vng (Migrated from github.com) commented 2023-07-30 13:09:11 +00:00

Hm, SimplifyPoints function always keep at least 2 points if we have valid input (>= 2 points)
So, my point is to validate input from contours which also I assume should produce valid lines.

Hm, SimplifyPoints function always keep at least 2 points if we have valid input (>= 2 points) So, my point is to validate input from contours which also I assume should produce valid lines.
pastk reviewed 2023-07-30 13:11:24 +00:00
Author
Owner

For non-isolines we can convert A-B-A to A-B somewhere around feature_maker (when source OSM ways are processed).
So at this point (after we start using IsGoodOutlineForLevel() in feature_sorter for non-isolines) there should be no such cases.

For non-isolines we can convert A-B-A to A-B somewhere around feature_maker (when source OSM ways are processed). So at this point (after we start using IsGoodOutlineForLevel() in feature_sorter for non-isolines) there should be no such cases.
pastk reviewed 2023-07-30 13:16:45 +00:00
Author
Owner

So if you want to terminate on invalid input then I'll change to CHECK()

So if you want to terminate on invalid input then I'll change to CHECK()
vng (Migrated from github.com) reviewed 2023-07-30 13:34:00 +00:00
vng (Migrated from github.com) commented 2023-07-30 13:34:00 +00:00

At least we ensure that GenerateContours makes a good output.

At least we ensure that GenerateContours makes a good output.
pastk reviewed 2023-07-30 14:52:15 +00:00
Author
Owner

Ok, I've changed it

Ok, I've changed it
vng (Migrated from github.com) approved these changes 2023-07-31 17:25:03 +00:00
vng (Migrated from github.com) reviewed 2023-07-31 21:47:53 +00:00
vng (Migrated from github.com) commented 2023-07-31 21:47:53 +00:00

Leave this comment:

/// @todo m_targetDir is a final MWM folder like 220702, so there is NO borders folder inside,
/// and the next function call always returns false.
Leave this comment: ``` /// @todo m_targetDir is a final MWM folder like 220702, so there is NO borders folder inside, /// and the next function call always returns false. ```
This repo is archived. You cannot comment on pull requests.
No reviewers
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#5624
No description provided.