[Feat] 코스 polyline 경사 등급 segments 응답 추가#175
Conversation
GET /api/courses/{courseId} 응답에 polyline 의 연속된 같은 경사 등급 구간(segments) 을 함께 반환한다.
클라이언트는 각 segment 의 startIdx~endIdx(둘 다 inclusive) 범위의 좌표를
등급별 색(5단계: STEEP_DOWN/MILD_DOWN/FLAT/MILD_UP/STEEP_UP) 으로 그릴 수 있다.
처리:
- altitudes 이동평균(window=5) 으로 GPS 노이즈 완화
- 인접 점 수평거리(Haversine) + 고도차로 경사도(%) 계산
- ±5% / ±15% 임계로 5단계 분류
- 같은 등급 연속 구간 묶기
Swagger 문서(@operation description / @Schema) 도 함께 보강.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, 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! 이 PR은 코스 상세 조회 API 응답에 경사 등급 정보를 포함하는 기능을 추가합니다. 기존의 polyline과 고도 데이터를 활용하여 코스의 경사도를 분석하고, 이를 연속된 구간(segments)으로 묶어 반환함으로써 클라이언트 측에서 코스의 난이도를 시각적으로 표현할 수 있도록 지원합니다. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces slope grade segments to the course detail response, allowing clients to render course polylines with color-coded slope classifications. It adds SlopeGrade and SlopeSegmentResponse DTOs, and implements CourseSlopeSegmentCalculator to compute these segments using GPS smoothing and Haversine distance. Feedback highlights two key issues: a missing mock for the new calculator in CourseServiceTest which will cause test failures, and a potential NullPointerException in CourseSlopeSegmentCalculator if altitudesJson parses to null.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🧾 요약
🔗 이슈
✨ 변경 내용
✅ 확인