that's too much!
This commit is contained in:
89
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/README.md
vendored
Normal file
89
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/README.md
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
# Test datasets
|
||||
|
||||
## Natural Earth lowres
|
||||
|
||||
`naturalearth_lowres.shp` was copied from GeoPandas.
|
||||
|
||||
## FGDB test dataset
|
||||
|
||||
`test_fgdb.gdb.zip`
|
||||
Downloaded from http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip
|
||||
|
||||
### GPKG test dataset with null values
|
||||
|
||||
`test_gpkg_nulls.gpkg` was created using Fiona backend to GeoPandas:
|
||||
|
||||
```
|
||||
from collections import OrderedDict
|
||||
|
||||
import fiona
|
||||
import geopandas as gp
|
||||
import numpy as np
|
||||
from pyogrio import write_dataframe
|
||||
|
||||
filename = "test_gpkg_nulls.gpkg"
|
||||
|
||||
df = gp.GeoDataFrame(
|
||||
{
|
||||
"col_bool": np.array([True, False, True], dtype="bool"),
|
||||
"col_int8": np.array([1, 2, 3], dtype="int8"),
|
||||
"col_int16": np.array([1, 2, 3], dtype="int16"),
|
||||
"col_int32": np.array([1, 2, 3], dtype="int32"),
|
||||
"col_int64": np.array([1, 2, 3], dtype="int64"),
|
||||
"col_uint8": np.array([1, 2, 3], dtype="uint8"),
|
||||
"col_uint16": np.array([1, 2, 3], dtype="uint16"),
|
||||
"col_uint32": np.array([1, 2, 3], dtype="uint32"),
|
||||
"col_uint64": np.array([1, 2, 3], dtype="uint64"),
|
||||
"col_float32": np.array([1.5, 2.5, 3.5], dtype="float32"),
|
||||
"col_float64": np.array([1.5, 2.5, 3.5], dtype="float64"),
|
||||
},
|
||||
geometry=gp.points_from_xy([0, 1, 2], [0, 1, 2]),
|
||||
crs="EPSG:4326",
|
||||
)
|
||||
|
||||
write_dataframe(df, filename)
|
||||
|
||||
# construct row with null values
|
||||
# Note: np.nan can only be used for float values
|
||||
null_row = {
|
||||
"type": "Fetaure",
|
||||
"id": 4,
|
||||
"properties": OrderedDict(
|
||||
[
|
||||
("col_bool", None),
|
||||
("col_int8", None),
|
||||
("col_int16", None),
|
||||
("col_int32", None),
|
||||
("col_int64", None),
|
||||
("col_uint8", None),
|
||||
("col_uint16", None),
|
||||
("col_uint32", None),
|
||||
("col_uint64", None),
|
||||
("col_float32", np.nan),
|
||||
("col_float64", np.nan),
|
||||
]
|
||||
),
|
||||
"geometry": {"type": "Point", "coordinates": (4.0, 4.0)},
|
||||
}
|
||||
|
||||
# append row with nulls to GPKG
|
||||
with fiona.open(filename, "a") as c:
|
||||
c.write(null_row)
|
||||
```
|
||||
|
||||
NOTE: Reading boolean values into GeoPandas using Fiona backend treats those
|
||||
values as `None` and column dtype as `object`; Pyogrio treats those values as
|
||||
`np.nan` and column dtype as `float64`.
|
||||
|
||||
### GPKG test with MultiSurface
|
||||
|
||||
This was extracted from https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHDPlusHR/Beta/GDB/NHDPLUS_H_0308_HU4_GDB.zip
|
||||
`NHDWaterbody` layer using ogr2ogr:
|
||||
|
||||
```bash
|
||||
ogr2ogr test_mixed_surface.gpkg NHDPLUS_H_0308_HU4_GDB.gdb NHDWaterbody -where '"NHDPlusID" = 15000300070477' -select "NHDPlusID"
|
||||
```
|
||||
|
||||
### OSM PBF test
|
||||
|
||||
This was downloaded from https://github.com/openstreetmap/OSM-binary/blob/master/resources/sample.pbf
|
||||
@@ -0,0 +1 @@
|
||||
ISO-8859-1
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
||||
Binary file not shown.
Binary file not shown.
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/sample.osm.pbf
vendored
Normal file
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/sample.osm.pbf
vendored
Normal file
Binary file not shown.
7
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_datetime.geojson
vendored
Normal file
7
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_datetime.geojson
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{ "type": "Feature", "properties": { "col": "2020-01-01T09:00:00.123" }, "geometry": { "type": "Point", "coordinates": [ 1.0, 1.0 ] } },
|
||||
{ "type": "Feature", "properties": { "col": "2020-01-01T10:00:00" }, "geometry": { "type": "Point", "coordinates": [ 2.0, 2.0 ] } }
|
||||
]
|
||||
}
|
||||
8
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_datetime_tz.geojson
vendored
Normal file
8
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_datetime_tz.geojson
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
||||
"features": [
|
||||
{ "type": "Feature", "properties": { "datetime_col": "2020-01-01T09:00:00.123-05:00" }, "geometry": { "type": "Point", "coordinates": [ 1.0, 1.0 ] } },
|
||||
{ "type": "Feature", "properties": { "datetime_col": "2020-01-01T10:00:00-05:00" }, "geometry": { "type": "Point", "coordinates": [ 2.0, 2.0 ] } }
|
||||
]
|
||||
}
|
||||
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_fgdb.gdb.zip
vendored
Normal file
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_fgdb.gdb.zip
vendored
Normal file
Binary file not shown.
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_gpkg_nulls.gpkg
vendored
Normal file
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_gpkg_nulls.gpkg
vendored
Normal file
Binary file not shown.
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_multisurface.gpkg
vendored
Normal file
BIN
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_multisurface.gpkg
vendored
Normal file
Binary file not shown.
18
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_nested.geojson
vendored
Normal file
18
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_nested.geojson
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [0, 0]
|
||||
},
|
||||
"properties": {
|
||||
"top_level": "A",
|
||||
"intermediate_level": {
|
||||
"bottom_level": "B"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
12
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_ogr_types_list.geojson
vendored
Normal file
12
.venv/lib/python3.12/site-packages/pyogrio/tests/fixtures/test_ogr_types_list.geojson
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"name": "test",
|
||||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
||||
"features": [
|
||||
{ "type": "Feature", "properties": { "int64": 1, "list_int64": [ 0, 1 ] }, "geometry": { "type": "Point", "coordinates": [ 0.0, 2.0 ] } },
|
||||
{ "type": "Feature", "properties": { "int64": 2, "list_int64": [ 2, 3 ] }, "geometry": { "type": "Point", "coordinates": [ 1.0, 2.0 ] } },
|
||||
{ "type": "Feature", "properties": { "int64": 3, "list_int64": [ 4, 5 ] }, "geometry": { "type": "Point", "coordinates": [ 2.0, 2.0 ] } },
|
||||
{ "type": "Feature", "properties": { "int64": 4, "list_int64": [ 6, 7 ] }, "geometry": { "type": "Point", "coordinates": [ 3.0, 2.0 ] } },
|
||||
{ "type": "Feature", "properties": { "int64": 5, "list_int64": [ 8, 9 ] }, "geometry": { "type": "Point", "coordinates": [ 4.0, 2.0 ] } }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user