File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -946,6 +946,11 @@ def test_write_geometry_z_types_auto(
946
946
gdf = gp .GeoDataFrame (column_data , geometry = from_wkt (wkt ), crs = "EPSG:4326" )
947
947
filename = tmp_path / f"test{ ext } "
948
948
949
+ if ext == ".fgb" :
950
+ # writing empty / null geometries not allowed by FlatGeobuf for
951
+ # GDAL >= 3.6.4 and were simply not written previously
952
+ gdf = gdf .loc [~ (gdf .geometry .isna () | gdf .geometry .is_empty )]
953
+
949
954
if mixed_dimensions and DRIVERS [ext ] in DRIVERS_NO_MIXED_DIMENSIONS :
950
955
with pytest .raises (
951
956
DataSourceError ,
@@ -962,10 +967,6 @@ def test_write_geometry_z_types_auto(
962
967
result_gdf = read_dataframe (filename )
963
968
if ext == ".geojsonl" :
964
969
result_gdf .crs = "EPSG:4326"
965
- if ext == ".fgb" :
966
- # When the following gdal issue is released, this if needs to be removed:
967
- # https://github.com/OSGeo/gdal/issues/7401
968
- gdf = gdf .loc [~ ((gdf .geometry == np .array (None )) | gdf .geometry .is_empty )]
969
970
970
971
assert_geodataframe_equal (gdf , result_gdf )
971
972
You can’t perform that action at this time.
0 commit comments