Skip to content

Conversation

@cambio-deca
Copy link

Summary

The coordinate mapper assume that is used Latitude and Longitude tag, but these tags can use replaced by gml:pos tag (used in some Netex italian files).

Unit tests

Created a unit test handleCoordinateWithGmlPosition in WgsCoordinateMapperTest.
Tested with italian Netex files.

@cambio-deca cambio-deca requested a review from a team as a code owner February 20, 2024 10:25
@codecov
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.69%. Comparing base (5da2268) to head (7601060).
⚠️ Report is 5915 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #5697   +/-   ##
==========================================
  Coverage      67.69%   67.69%           
- Complexity     16369    16374    +5     
==========================================
  Files           1890     1890           
  Lines          71812    71817    +5     
  Branches        7407     7409    +2     
==========================================
+ Hits           48611    48617    +6     
  Misses         20693    20693           
+ Partials        2508     2507    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

static WgsCoordinate mapToDomain(SimplePoint_VersionStructure point) {
if (point == null || point.getLocation() == null) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Javadoc for the mapToDomain method is obsolete, this PR gives a good opportunity to update it.

  • You can explain here that we need to convert from the LON/LAT convention in GML to the LAT/LON convention in WGS since this is a usual source of bug/confusion.
  • You can also describe here the fallback logic you implemented.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giuseppesaraceno can you update the doc?

@vpaturet vpaturet added the +NeTEx This issue is related to the Netex model/import. label Feb 27, 2024
@leonardehrenfried leonardehrenfried changed the title feat: check and use gml:pos tag if Latitude and Longitude not exists Netex: check and use gml:pos tag if Latitude and Longitude not exists Feb 29, 2024
@t2gran
Copy link
Member

t2gran commented Mar 1, 2024

I looked at this as well, looks good - but I will let someone from another organization take the second review. (@vpaturet and I are both from Entur).

@t2gran t2gran added this to the 2.5 (next release) milestone Mar 1, 2024
@t2gran t2gran added the !Improvement A functional improvement or micro feature label Mar 1, 2024
@leonardehrenfried leonardehrenfried changed the title Netex: check and use gml:pos tag if Latitude and Longitude not exists Netex: check and use gml:pos tag if Latitude and Longitude doesn't exists Mar 12, 2024
@leonardehrenfried leonardehrenfried marked this pull request as draft March 12, 2024 09:18
@leonardehrenfried
Copy link
Member

I have converted this to a draft. Please convert it back to a Pull Request when you have updated the Javadoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature +NeTEx This issue is related to the Netex model/import.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants