Skip to content
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

Flex: Investigate integration of geojson files #1758

Closed
emmambd opened this issue May 13, 2024 · 4 comments
Closed

Flex: Investigate integration of geojson files #1758

emmambd opened this issue May 13, 2024 · 4 comments
Assignees
Labels
do not merge This PR needs more work/discussion or is not meant to be merged flex Rules and rule changes related to GTFS-Flex.

Comments

@emmambd
Copy link
Contributor

emmambd commented May 13, 2024

In order to support Flex, we need to add locations.geojson to our schemas and validate against it.

We need to investigate what library to use to best support this and how to test it adequately.

@emmambd emmambd added the flex Rules and rule changes related to GTFS-Flex. label May 13, 2024
@davidgamez
Copy link
Member

Timebox: 2days

@davidgamez davidgamez self-assigned this May 13, 2024
@emmambd emmambd added this to the Flex: modifying pre-existing rules milestone May 14, 2024
@emmambd emmambd modified the milestones: Flex: modifying pre-existing rules, 6.0 Validator Release May 30, 2024
@qcdyx
Copy link
Contributor

qcdyx commented Jul 10, 2024

1. GeoTools
GeoTools is an open-source Java library that provides tools for geospatial data manipulation, including support for reading and writing GeoJSON.

2. GeoJSON-Jackson
GeoJSON-Jackson is a library that integrates Jackson (a popular JSON processing library) with GeoJSON, providing a straightforward way to serialize and deserialize GeoJSON objects in Java.

Scope and Functionality
GeoTools is a comprehensive geospatial data processing library that supports a wide range of data formats, including GeoJSON, Shapefiles, GML, and more. It provides tools for advanced geospatial operations such as spatial analysis, data transformation, and visualization. GeoTools is suitable for applications requiring extensive geospatial data manipulation capabilities.

GeoJSON-Jackson is a more focused library that integrates Jackson (a popular JSON processing library) with GeoJSON. It is designed specifically for serializing and deserializing GeoJSON data to and from Java objects. GeoJSON-Jackson is ideal for applications that primarily work with GeoJSON data and require straightforward serialization/deserialization without the need for complex geospatial operations.

Ease of Use
GeoTools has a steeper learning curve due to its extensive functionality and the complexity of some of its operations. However, it provides powerful capabilities for those who need to perform advanced geospatial data processing.

GeoJSON-Jackson is simpler to use for tasks related to GeoJSON, thanks to its focus on serialization and deserialization. It's a good choice for projects that need to quickly and easily work with GeoJSON data in Java without the overhead of a larger geospatial library.

Performance
GeoTools is designed for high-performance geospatial data processing, but its broader scope means that it might introduce more overhead than necessary for projects that only require GeoJSON handling.

GeoJSON-Jackson is likely to be more lightweight and faster for GeoJSON-specific tasks, as it does not include the extensive geospatial processing capabilities that GeoTools offers. This makes it a more efficient choice for projects focused solely on GeoJSON data.

Use Case Examples
Use GeoTools if you are developing a complex geospatial application that requires reading, writing, and processing a variety of geospatial data formats, performing spatial analysis, or integrating with geospatial databases.

Use GeoJSON-Jackson if your application primarily deals with GeoJSON data and you need a straightforward way to serialize and deserialize GeoJSON objects in Java. It's particularly well-suited for applications that do not require the full suite of geospatial operations provided by GeoTools.

Conclusion
In summary, the choice between GeoTools and GeoJSON-Jackson should be based on the specific needs of your project. For advanced geospatial data processing and support for multiple data formats, GeoTools is the better option. For simpler projects focused on GeoJSON data handling, GeoJSON-Jackson offers a more streamlined and efficient approach.

@qcdyx
Copy link
Contributor

qcdyx commented Jul 10, 2024

https://docs.google.com/document/d/1QABoIeOdR6lAB7A6_X6WIbZwC7EnAIZvm_hRNwNQeoI/edit
GeoJSON-Jackson does not have built-in visualization features while GeoTools includes capabilities for rendering and visualizing geospatial data. GeoTools stand out since we need to visualize shape of the overlapping geometries in Phase 2.

@qcdyx
Copy link
Contributor

qcdyx commented Jul 15, 2024

Conclusion: we can use GeoTools as the library for reading in locations.geojson file. It's open source and it supports visualization of geospatial data.

I'll add how to set up GeoTools gradle dependencies in #1750.

@qcdyx qcdyx added the do not merge This PR needs more work/discussion or is not meant to be merged label Jul 15, 2024
@emmambd emmambd closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge This PR needs more work/discussion or is not meant to be merged flex Rules and rule changes related to GTFS-Flex.
Projects
None yet
3 participants