-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:locations.geojson
file parsing and geometry validation
#1879
Conversation
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 8dde4c0 📊 Notices ComparisonNew Errors (2 out of 1588 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1588 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
|
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJSONFileLoader.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJSONFileLoader.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/report/model/FeedMetadata.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJSONFileLoader.java
Outdated
Show resolved
Hide resolved
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 8412859 📊 Notices ComparisonNew Errors (2 out of 1588 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1588 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
|
As discussed with @tzujenchanmbd, a partial list of changes:
|
Not sure if it's all included in this PR, just try to clarify everything regarding There are 3-levels Perhaps there could be 3 different notice name for each: |
@tzujenchanmbd @emmambd Could you specify what would be the columns/description for :
Could you also confirm that the names and descriptions for the existing notices are ok? (except unsupported_location_type that will be modified) |
Notice name, column displayed, and description lgtm from the screenshot. |
@cka-y Approved notice details: unsupported_geojson_type unsupported_feature_type |
@emmambd done ✅ |
locations.geojson
file parsing and geometry validation
Visual Justification of Differences in Acceptance TestsThe acceptance tests reveal a new For
|
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 9e95a69 📊 Notices ComparisonNew Errors (2 out of 1588 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1588 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory ConsumptionList of 25 datasets(memory has increased).
List of 25 datasets(memory has decreased).
List of 25 datasets(no reference available).
|
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 2f14dca 📊 Notices ComparisonNew Errors (2 out of 1588 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1588 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1588 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory ConsumptionList of 25 datasets(memory has increased).
List of 25 datasets(memory has decreased).
List of 25 datasets(no reference available).
|
Do you know why for some files git knows it's a rename (e.g. GtfsGeojsonFeaturesContainer.java to GtfsGeoJsonFeaturesContainer.java) and others not (e.g. GeojsonFileLoader.java to GeoJsonFileLoader.java). |
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJsonFileLoader.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJsonFileLoader.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJsonFileLoader.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GeoJsonFileLoader.java
Outdated
Show resolved
Hide resolved
…nFileLoader.java Co-authored-by: jcpitre <106176106+jcpitre@users.noreply.github.com>
…nFileLoader.java Co-authored-by: jcpitre <106176106+jcpitre@users.noreply.github.com>
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit ac8e8d2 📊 Notices ComparisonNew Errors (2 out of 1602 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1602 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
core/src/main/java/org/mobilitydata/gtfsvalidator/notice/InvalidGeometryNotice.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, as usual
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit ba9ab41 📊 Notices ComparisonNew Errors (2 out of 1602 datasets, ~0%) ✅Details of new errors due to code change, which is less than the provided threshold of 1%.
Dropped Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1602 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
Summary:
Part of #1850
This PR introduces enhancements for validating GeoJSON files. The most notable changes include the addition of new validation notice classes, the implementation of a
GeoJsonGeometryValidator
class, and the renaming of classes to align with a consistent naming convention.Validation Notices:
InvalidGeometryNotice
- Triggered when a GeoJSON file contains invalid geometry that does not adhere to the specified structure.MissingRequiredElementNotice
- Raised when elements required in the GeoJSON format are absent.UnsupportedGeometryTypeNotice
- Issued for geometry types that are not currently supported by our validator (supporting onlyPolygon
andMultiPolygon
).Dependency Updates:
org.locationtech.jts:jts-core:1.20.0
to manage geometric operations in compliance with the GeoJSON standards. The update is reflected inmain/build.gradle
.Geometry Validation
isValid
function from thelocationtech.jts
library to verify that polygons conform to these criteria, as outlined by the OGC SFS specification, which is an implementation of the OpenGIS standards for geographic information systems. Reference documentation.Expected Behavior:
To verify these changes, you can use the provided test feed example. Below is a sample validation result, showing expected error notices:
Other notices covered in this PR:
type
Example of problem location from mdb-2052 feature
area_915
(self intersection in the red square):Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything