Implement GeoPandasVectorSource #2306
JamesZDonline
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
I think this is a great idea and something I've thought of doing myself. Any contributions would be very welcome! One wrinkle you might run into is that currently a lot of the GeoJSON-handling is actually part of the base Please feel free to reach out if you have any other questions as you work on this! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
While there are many potential vector sources out there, the only concrete implementation of the VectorSource class in RasterVision is the GeoJSONVectorSource. I'm proposing a GeoPandasVectorSource that takes a GeoPandas.DataFrame (or list of them) to construct a VectorSource.
Potential Advantages to a GeoPandasVectorSource
Would there be interest in this? Can anyone see any barriers or potential problems with this approach? From my understanding of the code, it seems like it would not be too challenging, but I'm happy to admit I've been wrong before and may have missed some crucial details. :)
We have a team member who is willing to take this on if there is interest.
Example use case:
Right now we have our vector data stored in a PostGIS database. When we want to run an experiment with a dataset, we connect to the database, pull it down as a GeoPandas.DataFrame, do a series of preprocessing steps (filtering, organizing, performing transformations, adding class_ids etc) before finally exporting them to geojson files (sorted in a directory structure by AOI and Label with a csv to match them up). If we want to run another experiment with slightly different data or different preprocessing, we run the whole process again and end up with another directory filled with several hundred geojsons. Tracking versioning has started to get complicated and confusing. If we could use the DataFrames directly, then we wouldn't need to store and version the whole data, we could just version the configuration of the preprocessing script and pull the data from our database again as needed.
Beta Was this translation helpful? Give feedback.
All reactions