Fix issue in from_records not tracking crs correctly in intersections function #96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a quick fix for #95. The main issue is that the from_records function is inherited from the pandas library, and it does not track so when it creates a GeoDataFrame from a list of records, it does not assign the column labeled "geometry" as a geometry column, and, with the new change to pandas 2, it looks like this ends up throwing the following error:
ValueError: Assigning CRS to a GeoDataFrame without a geometry column is not supported. Use GeoDataFrame.set_geometry to set the active geometry column.`
If we use the constructor for the GeoDataFrame object intead, then geopandas correctly handles the geometry column, and we can assign the crs to the GeoDataFrame object directly.