├── .gitignore ├── README.md ├── collect-README.R ├── collect-manifest.py ├── collect_parquet_builtin.py ├── example-crs ├── README.md ├── collect.py ├── files │ ├── example-crs_vermont-4326.fgb │ ├── example-crs_vermont-4326.parquet │ ├── example-crs_vermont-4326_geo.parquet │ ├── example-crs_vermont-4326_wkb.arrows │ ├── example-crs_vermont-crs84-auth-code.parquet │ ├── example-crs_vermont-crs84-auth-code_wkb.arrows │ ├── example-crs_vermont-crs84-unknown.parquet │ ├── example-crs_vermont-crs84-unknown_wkb.arrows │ ├── example-crs_vermont-crs84-wkt2.parquet │ ├── example-crs_vermont-crs84-wkt2_wkb.arrows │ ├── example-crs_vermont-crs84.fgb │ ├── example-crs_vermont-crs84.parquet │ ├── example-crs_vermont-crs84_geo.parquet │ ├── example-crs_vermont-crs84_wkb.arrows │ ├── example-crs_vermont-custom.fgb │ ├── example-crs_vermont-custom.parquet │ ├── example-crs_vermont-custom_geo.parquet │ ├── example-crs_vermont-custom_wkb.arrows │ ├── example-crs_vermont-utm.fgb │ ├── example-crs_vermont-utm.parquet │ ├── example-crs_vermont-utm_geo.parquet │ └── example-crs_vermont-utm_wkb.arrows └── manifest.yaml ├── example ├── README.md ├── collect.py ├── example_src.yaml ├── example_src_generated.R ├── example_src_generated.yaml ├── files │ ├── example_geometry-m.parquet │ ├── example_geometry-m.tsv │ ├── example_geometry-m_geo.parquet │ ├── example_geometry-m_wkb.arrows │ ├── example_geometry-m_wkt.arrows │ ├── example_geometry-mixed-dimensions.parquet │ ├── example_geometry-mixed-dimensions.tsv │ ├── example_geometry-mixed-dimensions_geo.parquet │ ├── example_geometry-mixed-dimensions_wkb.arrows │ ├── example_geometry-mixed-dimensions_wkt.arrows │ ├── example_geometry-z.parquet │ ├── example_geometry-z.tsv │ ├── example_geometry-z_geo.parquet │ ├── example_geometry-z_wkb.arrows │ ├── example_geometry-z_wkt.arrows │ ├── example_geometry-zm.parquet │ ├── example_geometry-zm.tsv │ ├── example_geometry-zm_geo.parquet │ ├── example_geometry-zm_wkb.arrows │ ├── example_geometry-zm_wkt.arrows │ ├── example_geometry.parquet │ ├── example_geometry.tsv │ ├── example_geometry_geo.parquet │ ├── example_geometry_wkb.arrows │ ├── example_geometry_wkt.arrows │ ├── example_geometrycollection-m.parquet │ ├── example_geometrycollection-m.tsv │ ├── example_geometrycollection-m_geo.parquet │ ├── example_geometrycollection-m_wkb.arrows │ ├── example_geometrycollection-m_wkt.arrows │ ├── example_geometrycollection-nested-m.parquet │ ├── example_geometrycollection-nested-m.tsv │ ├── example_geometrycollection-nested-m_geo.parquet │ ├── example_geometrycollection-nested-m_wkb.arrows │ ├── example_geometrycollection-nested-m_wkt.arrows │ ├── example_geometrycollection-nested-z.parquet │ ├── example_geometrycollection-nested-z.tsv │ ├── example_geometrycollection-nested-z_geo.parquet │ ├── example_geometrycollection-nested-z_wkb.arrows │ ├── example_geometrycollection-nested-z_wkt.arrows │ ├── example_geometrycollection-nested-zm.parquet │ ├── example_geometrycollection-nested-zm.tsv │ ├── example_geometrycollection-nested-zm_geo.parquet │ ├── example_geometrycollection-nested-zm_wkb.arrows │ ├── example_geometrycollection-nested-zm_wkt.arrows │ ├── example_geometrycollection-nested.parquet │ ├── example_geometrycollection-nested.tsv │ ├── example_geometrycollection-nested_geo.parquet │ ├── example_geometrycollection-nested_wkb.arrows │ ├── example_geometrycollection-nested_wkt.arrows │ ├── example_geometrycollection-z.parquet │ ├── example_geometrycollection-z.tsv │ ├── example_geometrycollection-z_geo.parquet │ ├── example_geometrycollection-z_wkb.arrows │ ├── example_geometrycollection-z_wkt.arrows │ ├── example_geometrycollection-zm.parquet │ ├── example_geometrycollection-zm.tsv │ ├── example_geometrycollection-zm_geo.parquet │ ├── example_geometrycollection-zm_wkb.arrows │ ├── example_geometrycollection-zm_wkt.arrows │ ├── example_geometrycollection.parquet │ ├── example_geometrycollection.tsv │ ├── example_geometrycollection_geo.parquet │ ├── example_geometrycollection_wkb.arrows │ ├── example_geometrycollection_wkt.arrows │ ├── example_linestring-m.arrows │ ├── example_linestring-m.parquet │ ├── example_linestring-m.tsv │ ├── example_linestring-m_geo.parquet │ ├── example_linestring-m_interleaved.arrows │ ├── example_linestring-m_native.parquet │ ├── example_linestring-m_wkb.arrows │ ├── example_linestring-m_wkt.arrows │ ├── example_linestring-z.arrows │ ├── example_linestring-z.parquet │ ├── example_linestring-z.tsv │ ├── example_linestring-z_geo.parquet │ ├── example_linestring-z_interleaved.arrows │ ├── example_linestring-z_native.parquet │ ├── example_linestring-z_wkb.arrows │ ├── example_linestring-z_wkt.arrows │ ├── example_linestring-zm.arrows │ ├── example_linestring-zm.parquet │ ├── example_linestring-zm.tsv │ ├── example_linestring-zm_geo.parquet │ ├── example_linestring-zm_interleaved.arrows │ ├── example_linestring-zm_native.parquet │ ├── example_linestring-zm_wkb.arrows │ ├── example_linestring-zm_wkt.arrows │ ├── example_linestring.arrows │ ├── example_linestring.parquet │ ├── example_linestring.tsv │ ├── example_linestring_geo.parquet │ ├── example_linestring_interleaved.arrows │ ├── example_linestring_native.parquet │ ├── example_linestring_wkb.arrows │ ├── example_linestring_wkt.arrows │ ├── example_multilinestring-m.arrows │ ├── example_multilinestring-m.parquet │ ├── example_multilinestring-m.tsv │ ├── example_multilinestring-m_geo.parquet │ ├── example_multilinestring-m_interleaved.arrows │ ├── example_multilinestring-m_native.parquet │ ├── example_multilinestring-m_wkb.arrows │ ├── example_multilinestring-m_wkt.arrows │ ├── example_multilinestring-z.arrows │ ├── example_multilinestring-z.parquet │ ├── example_multilinestring-z.tsv │ ├── example_multilinestring-z_geo.parquet │ ├── example_multilinestring-z_interleaved.arrows │ ├── example_multilinestring-z_native.parquet │ ├── example_multilinestring-z_wkb.arrows │ ├── example_multilinestring-z_wkt.arrows │ ├── example_multilinestring-zm.arrows │ ├── example_multilinestring-zm.parquet │ ├── example_multilinestring-zm.tsv │ ├── example_multilinestring-zm_geo.parquet │ ├── example_multilinestring-zm_interleaved.arrows │ ├── example_multilinestring-zm_native.parquet │ ├── example_multilinestring-zm_wkb.arrows │ ├── example_multilinestring-zm_wkt.arrows │ ├── example_multilinestring.arrows │ ├── example_multilinestring.parquet │ ├── example_multilinestring.tsv │ ├── example_multilinestring_geo.parquet │ ├── example_multilinestring_interleaved.arrows │ ├── example_multilinestring_native.parquet │ ├── example_multilinestring_wkb.arrows │ ├── example_multilinestring_wkt.arrows │ ├── example_multipoint-m.arrows │ ├── example_multipoint-m.parquet │ ├── example_multipoint-m.tsv │ ├── example_multipoint-m_geo.parquet │ ├── example_multipoint-m_interleaved.arrows │ ├── example_multipoint-m_native.parquet │ ├── example_multipoint-m_wkb.arrows │ ├── example_multipoint-m_wkt.arrows │ ├── example_multipoint-z.arrows │ ├── example_multipoint-z.parquet │ ├── example_multipoint-z.tsv │ ├── example_multipoint-z_geo.parquet │ ├── example_multipoint-z_interleaved.arrows │ ├── example_multipoint-z_native.parquet │ ├── example_multipoint-z_wkb.arrows │ ├── example_multipoint-z_wkt.arrows │ ├── example_multipoint-zm.arrows │ ├── example_multipoint-zm.parquet │ ├── example_multipoint-zm.tsv │ ├── example_multipoint-zm_geo.parquet │ ├── example_multipoint-zm_interleaved.arrows │ ├── example_multipoint-zm_native.parquet │ ├── example_multipoint-zm_wkb.arrows │ ├── example_multipoint-zm_wkt.arrows │ ├── example_multipoint.arrows │ ├── example_multipoint.parquet │ ├── example_multipoint.tsv │ ├── example_multipoint_geo.parquet │ ├── example_multipoint_interleaved.arrows │ ├── example_multipoint_native.parquet │ ├── example_multipoint_wkb.arrows │ ├── example_multipoint_wkt.arrows │ ├── example_multipolygon-m.arrows │ ├── example_multipolygon-m.parquet │ ├── example_multipolygon-m.tsv │ ├── example_multipolygon-m_geo.parquet │ ├── example_multipolygon-m_interleaved.arrows │ ├── example_multipolygon-m_native.parquet │ ├── example_multipolygon-m_wkb.arrows │ ├── example_multipolygon-m_wkt.arrows │ ├── example_multipolygon-z.arrows │ ├── example_multipolygon-z.parquet │ ├── example_multipolygon-z.tsv │ ├── example_multipolygon-z_geo.parquet │ ├── example_multipolygon-z_interleaved.arrows │ ├── example_multipolygon-z_native.parquet │ ├── example_multipolygon-z_wkb.arrows │ ├── example_multipolygon-z_wkt.arrows │ ├── example_multipolygon-zm.arrows │ ├── example_multipolygon-zm.parquet │ ├── example_multipolygon-zm.tsv │ ├── example_multipolygon-zm_geo.parquet │ ├── example_multipolygon-zm_interleaved.arrows │ ├── example_multipolygon-zm_native.parquet │ ├── example_multipolygon-zm_wkb.arrows │ ├── example_multipolygon-zm_wkt.arrows │ ├── example_multipolygon.arrows │ ├── example_multipolygon.parquet │ ├── example_multipolygon.tsv │ ├── example_multipolygon_geo.parquet │ ├── example_multipolygon_interleaved.arrows │ ├── example_multipolygon_native.parquet │ ├── example_multipolygon_wkb.arrows │ ├── example_multipolygon_wkt.arrows │ ├── example_point-m.arrows │ ├── example_point-m.parquet │ ├── example_point-m.tsv │ ├── example_point-m_geo.parquet │ ├── example_point-m_interleaved.arrows │ ├── example_point-m_native.parquet │ ├── example_point-m_wkb.arrows │ ├── example_point-m_wkt.arrows │ ├── example_point-z.arrows │ ├── example_point-z.parquet │ ├── example_point-z.tsv │ ├── example_point-z_geo.parquet │ ├── example_point-z_interleaved.arrows │ ├── example_point-z_native.parquet │ ├── example_point-z_wkb.arrows │ ├── example_point-z_wkt.arrows │ ├── example_point-zm.arrows │ ├── example_point-zm.parquet │ ├── example_point-zm.tsv │ ├── example_point-zm_geo.parquet │ ├── example_point-zm_interleaved.arrows │ ├── example_point-zm_native.parquet │ ├── example_point-zm_wkb.arrows │ ├── example_point-zm_wkt.arrows │ ├── example_point.arrows │ ├── example_point.parquet │ ├── example_point.tsv │ ├── example_point_geo.parquet │ ├── example_point_interleaved.arrows │ ├── example_point_native.parquet │ ├── example_point_wkb.arrows │ ├── example_point_wkt.arrows │ ├── example_polygon-m.arrows │ ├── example_polygon-m.parquet │ ├── example_polygon-m.tsv │ ├── example_polygon-m_geo.parquet │ ├── example_polygon-m_interleaved.arrows │ ├── example_polygon-m_native.parquet │ ├── example_polygon-m_wkb.arrows │ ├── example_polygon-m_wkt.arrows │ ├── example_polygon-z.arrows │ ├── example_polygon-z.parquet │ ├── example_polygon-z.tsv │ ├── example_polygon-z_geo.parquet │ ├── example_polygon-z_interleaved.arrows │ ├── example_polygon-z_native.parquet │ ├── example_polygon-z_wkb.arrows │ ├── example_polygon-z_wkt.arrows │ ├── example_polygon-zm.arrows │ ├── example_polygon-zm.parquet │ ├── example_polygon-zm.tsv │ ├── example_polygon-zm_geo.parquet │ ├── example_polygon-zm_interleaved.arrows │ ├── example_polygon-zm_native.parquet │ ├── example_polygon-zm_wkb.arrows │ ├── example_polygon-zm_wkt.arrows │ ├── example_polygon.arrows │ ├── example_polygon.parquet │ ├── example_polygon.tsv │ ├── example_polygon_geo.parquet │ ├── example_polygon_interleaved.arrows │ ├── example_polygon_native.parquet │ ├── example_polygon_wkb.arrows │ └── example_polygon_wkt.arrows └── manifest.yaml ├── geoarrow-data.Rproj ├── manifest.json ├── microsoft-buildings ├── .gitignore ├── README.md ├── collect.py └── manifest.yaml ├── natural-earth ├── README.md ├── collect.py ├── files │ ├── natural-earth_cities.arrows │ ├── natural-earth_cities.fgb │ ├── natural-earth_cities.parquet │ ├── natural-earth_cities_geo.parquet │ ├── natural-earth_cities_interleaved.arrows │ ├── natural-earth_cities_native.parquet │ ├── natural-earth_cities_wkb.arrows │ ├── natural-earth_countries-bounds.arrows │ ├── natural-earth_countries-bounds.fgb │ ├── natural-earth_countries-bounds.parquet │ ├── natural-earth_countries-bounds_box.arrows │ ├── natural-earth_countries-bounds_geo.parquet │ ├── natural-earth_countries-bounds_interleaved.arrows │ ├── natural-earth_countries-bounds_native.parquet │ ├── natural-earth_countries-bounds_wkb.arrows │ ├── natural-earth_countries-geography.arrows │ ├── natural-earth_countries-geography.parquet │ ├── natural-earth_countries-geography_geo.parquet │ ├── natural-earth_countries-geography_interleaved.arrows │ ├── natural-earth_countries-geography_native.parquet │ ├── natural-earth_countries-geography_wkb.arrows │ ├── natural-earth_countries.arrows │ ├── natural-earth_countries.fgb │ ├── natural-earth_countries.parquet │ ├── natural-earth_countries_geo.parquet │ ├── natural-earth_countries_interleaved.arrows │ ├── natural-earth_countries_native.parquet │ └── natural-earth_countries_wkb.arrows └── manifest.yaml ├── ns-water ├── .gitignore ├── README.md ├── collect.py ├── manifest.yaml └── ns-water-attribute_specs.pdf ├── quadrangles ├── .gitignore ├── README.md ├── collect.py ├── files │ ├── quadrangles_100k.arrows │ ├── quadrangles_100k.fgb │ ├── quadrangles_100k.parquet │ ├── quadrangles_100k_box.arrows │ ├── quadrangles_100k_geo.parquet │ ├── quadrangles_100k_interleaved.arrows │ ├── quadrangles_100k_native.parquet │ └── quadrangles_100k_wkb.arrows └── manifest.yaml ├── requirements.txt ├── tests ├── __init__.py ├── model.py ├── test_geopandas.py ├── test_manifests.py ├── test_parquet.py └── test_structure.py └── upload-assets.py /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .Rdata 4 | .httr-oauth 5 | .DS_Store 6 | release-files 7 | __pycache__ 8 | .vscode 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # geoarrow-data 3 | 4 | This repository is a collection of recipies to make a few large-ish data sets available in [GeoParquet](https://github.com/opengeospatial/geoparquet)/[GeoArrow](https://github.com/geoarrow/geoarrow) format to facilitate testing, prototyping, and benchmarking implementations. 5 | 6 | ## [Examples](example#readme) 7 | 8 | Toy example files covering the grid of geometry types (point, linestring, polygon, multipoint, multilinestring, multipolygon, geometrycollection), dimensions (xy, xyz, xym, xyzm), and encodings (wkt, wkb, struct coordinates, interleaved coordinates). 9 | 10 | ## [Coordinate Reference System Examples](example-crs#readme) 11 | 12 | Example files containing the range of coordinate reference system encodings allowed by the GeoArrow specification, including files representing the same spatial content in several coordinate systems. 13 | 14 | ## [Nova Scotia Water](ns-water#readme) 15 | 16 | A geoarrow port of the Nova Scotia Hydrometric Network. This is useful as an example of a projected and aligned set of layers with realisitc attributes. 17 | 18 | ## [Microsoft U.S. Buliding Footprints](microsoft-buildings#readme) 19 | 20 | A geoarrow port of a large (130 million features) point data set. 21 | 22 | ## [Natural Earth](natural-earth#readme) 23 | 24 | Selected [Natural Earth](https://www.naturalearthdata.com/) layers as examples of global data. Also includes examples with spherical edges and boxes that span the antimeridian. 25 | 26 | ## [Quadrangles](quadrangles#readme) 27 | 28 | United States Geological Survey (USGS) map sheet outlines as real-world examples of the "box" type. 29 | -------------------------------------------------------------------------------- /collect-README.R: -------------------------------------------------------------------------------- 1 | 2 | library(tidyverse) 3 | library(jsonlite) 4 | 5 | manifest <- jsonlite::read_json("manifest.json") 6 | 7 | files <- tibble::tibble( 8 | group_desc = manifest$groups 9 | ) |> 10 | unnest_wider(group_desc) |> 11 | unnest_longer(files) |> 12 | unnest_wider(files, names_sep = "_") 13 | 14 | readme_content <- files |> 15 | mutate( 16 | group = as_factor(name), 17 | tag = manifest$ref, 18 | name = as_factor(files_name), 19 | format = as_factor(files_format), 20 | url = files_url 21 | ) |> 22 | mutate( 23 | md_link = glue::glue("[{format}]({url})") 24 | ) |> 25 | group_by(group, tag, name) |> 26 | summarise( 27 | link_summary = paste(md_link, collapse = ", "), 28 | bullet = glue::glue("- {name[1]} ({link_summary})"), 29 | .groups = "drop_last" 30 | ) |> 31 | select(-link_summary) |> 32 | summarise( 33 | file_listing = paste(bullet, collapse = "\n"), 34 | file_summary = glue::glue("## Files\n\n{file_listing}"), 35 | .groups = "drop_last" 36 | ) |> 37 | select(-file_listing) |> 38 | summarise( 39 | file_summary = paste0(file_summary, collapse = "\n\n"), 40 | .groups = "drop" 41 | ) |> 42 | mutate(readme_file = glue::glue("{group}/README.md")) 43 | 44 | readme_content 45 | 46 | for (i in seq_len(nrow(readme_content))) { 47 | f <- readme_content$readme_file[i] 48 | content <- readr::read_lines(f) 49 | target <- which(content == "") 50 | stopifnot(length(target) == 1L) 51 | 52 | readr::write_lines(content[1:target], f) 53 | readr::write_lines("\n", f, append = TRUE) 54 | readr::write_lines(readme_content$file_summary[i], f, append = TRUE) 55 | } 56 | -------------------------------------------------------------------------------- /collect-manifest.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | from pathlib import Path 4 | 5 | from tests import model 6 | 7 | if __name__ == "__main__": 8 | args = sys.argv[1:] 9 | ref = "REFERENCE" if len(args) == 0 else args[0] 10 | here = Path(__file__).parent 11 | 12 | groups = [] 13 | for manifest in model.list_manifests(): 14 | group = { 15 | "name": manifest.group, 16 | "files": [f.to_dict(ref) for f in manifest.list_files()], 17 | } 18 | groups.append(group) 19 | 20 | obj = {"ref": ref, "groups": groups} 21 | with open(here / "manifest.json", "w") as f: 22 | json.dump(obj, f, indent=2) 23 | -------------------------------------------------------------------------------- /collect_parquet_builtin.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import json 3 | 4 | # Currently requires nightly pyarrow 5 | import pyarrow as pa 6 | from pyarrow import parquet 7 | import geoarrow.pyarrow as ga 8 | 9 | here = Path(__file__).parent 10 | 11 | 12 | def list_wkb_files(): 13 | wkb_files = [] 14 | with open(here / "manifest.json") as f: 15 | manifest = json.load(f) 16 | for group in manifest["groups"]: 17 | for file in group["files"]: 18 | if file["format"] == "arrows/wkb": 19 | name = Path(file["url"]).name 20 | local_path = here / group["name"] / "files" / name 21 | assert local_path.exists() 22 | wkb_files.append(local_path) 23 | 24 | return wkb_files 25 | 26 | 27 | def convert_arrow_wkb_to_parquet(src, dst, compression): 28 | # Maintain chunking from IPC into Parquet so that the statistics 29 | # are theoretically the same. 30 | with ( 31 | pa.ipc.open_stream(src) as reader, 32 | parquet.ParquetWriter( 33 | dst, 34 | reader.schema, 35 | store_schema=False, 36 | compression=compression, 37 | ) as writer, 38 | ): 39 | print(f"Reading {src}") 40 | for batch in reader: 41 | writer.write_batch(batch) 42 | 43 | print(f"Wrote {dst}") 44 | 45 | 46 | def check_parquet_file(src, dst): 47 | # Read in original table for comparison 48 | with pa.ipc.open_stream(src) as reader: 49 | original_table = reader.read_all() 50 | 51 | print(f"Checking {dst}") 52 | with parquet.ParquetFile(dst, arrow_extensions_enabled=True) as f: 53 | if f.schema_arrow != original_table.schema: 54 | print(f"Schema mismatch:\n{f.schema_arrow}\nvs\n{original_table.schema}") 55 | return False 56 | 57 | reread = f.read() 58 | if reread != original_table: 59 | print("Table mismatch") 60 | return False 61 | 62 | return True 63 | 64 | 65 | def generate_geoarrow_data_parquet_files(wkb_files): 66 | successful_checks = 0 67 | written_files = 0 68 | for path in wkb_files: 69 | name = path.name.replace("_wkb.arrows", "") 70 | if name.startswith("ns-water") or name.startswith("microsoft"): 71 | compression = "zstd" 72 | else: 73 | compression = "none" 74 | 75 | dst = path.parent / f"{name}.parquet" 76 | convert_arrow_wkb_to_parquet(path, dst, compression=compression) 77 | written_files += 1 78 | successful_checks += check_parquet_file(path, dst) 79 | 80 | if successful_checks != written_files: 81 | raise ValueError("Some checks failed when generating testing files") 82 | 83 | 84 | if __name__ == "__main__": 85 | parquet_testing_path = here.parent / "parquet-testing" / "data" / "geospatial" 86 | wkb_files = list_wkb_files() 87 | generate_geoarrow_data_parquet_files(wkb_files) 88 | -------------------------------------------------------------------------------- /example-crs/README.md: -------------------------------------------------------------------------------- 1 | 2 | # CRS Examples 3 | 4 | The data here is a single polygon representing the outline of the U.S. State of Vermont (as sourced from [Natural Earth](https://www.naturalearthdata.com/) level 1 administrative boundary data) with various coordinate reference systems (CRS) and various CRS representations. The CRS values used are: 5 | 6 | - **OGC:CRS84**: Longitude/latitude on the WGS84 ellipsoid with the axis order of the coordinates specified as such. 7 | - **EPSG:4326**: Latitude/longitude on the WGS84 ellipsoid. While the stated axis order according to the CRS definition in latitude, longitude; the GeoArrow and GeoParquet standards requires that consumers and producers write longitude, latitude. This is sometimes called "natural" or "traditional GIS" order and is the most common way that data declared as EPSG:4326 is found in the wild. 8 | - **UTM Zone 18N**: Projected coordinates in universal transverse mercator (i.e., EPSG:32620) 9 | - **Custom orthographic**: An orthographc projection centred on the centroid of the state of Vermont that does not have any identifier in any database. 10 | 11 | The above examples are all specified with an explicit `"crs_type": "projjson"` when written in GeoArrow format. The OGC:CRS84 version of the data is also included using the CRS representations stated in the GeoArrow specification (`wkt2:2019`, `authority_code`, and omitted to indicate that the producer did not know what the CRS encoding was). 12 | 13 | All versions of Natural Earth map data redistributed from this repository are in the public domain. 14 | 15 | 16 | 17 | 18 | ## Files 19 | 20 | - vermont-crs84 ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84_geo.parquet), [fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84.fgb), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84.parquet)) 21 | - vermont-4326 ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-4326_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-4326_geo.parquet), [fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-4326.fgb), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-4326.parquet)) 22 | - vermont-utm ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm_geo.parquet), [fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm.fgb), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm.parquet)) 23 | - vermont-custom ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-custom_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-custom_geo.parquet), [fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-custom.fgb), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-custom.parquet)) 24 | - vermont-crs84-wkt2 ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-wkt2_wkb.arrows), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-wkt2.parquet)) 25 | - vermont-crs84-auth-code ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-auth-code_wkb.arrows), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-auth-code.parquet)) 26 | - vermont-crs84-unknown ([arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-unknown_wkb.arrows), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-crs84-unknown.parquet)) 27 | -------------------------------------------------------------------------------- /example-crs/collect.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | import geoarrow.pyarrow as ga 5 | import geopandas 6 | import pyarrow as pa 7 | import pyproj 8 | from geoarrow.pyarrow import io 9 | from geoarrow.rust.io import write_flatgeobuf 10 | from pyarrow import ipc 11 | 12 | # Original source: 13 | # https://www.naturalearthdata.com/ 14 | 15 | 16 | here = Path(__file__).parent 17 | CRSES = [ 18 | "OGC:CRS84", 19 | "EPSG:4326", 20 | "EPSG:32618", 21 | "+proj=ortho +lat_0=43.88 +lon_0=-72.69 +ellps=WGS84", 22 | ] 23 | CRS_LABELS = ["crs84", "4326", "utm", "custom"] 24 | 25 | 26 | def download_vermont(): 27 | pd = geopandas.read_file( 28 | "https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces.zip" 29 | ) 30 | 31 | return pd[["geometry"]][pd["name"] == "Vermont"] 32 | 33 | 34 | def write_parquet(lazy=True): 35 | pd = None 36 | 37 | for crs, label in zip(CRSES, CRS_LABELS): 38 | out = here / "files" / f"example-crs_vermont-{label}_geo.parquet" 39 | if lazy and out.exists(): 40 | continue 41 | 42 | if pd is None: 43 | pd = download_vermont() 44 | 45 | tab = pa.table({"geometry": ga.array(pd["geometry"].to_crs(crs))}) 46 | io.write_geoparquet_table( 47 | tab, out, compression="none", write_bbox=True, write_geometry_types=True 48 | ) 49 | 50 | return out 51 | 52 | 53 | def write_geoarrow(): 54 | for label in CRS_LABELS: 55 | out = here / "files" / f"example-crs_vermont-{label}_wkb.arrows" 56 | 57 | tab = io.read_geoparquet_table( 58 | here / "files" / f"example-crs_vermont-{label}_geo.parquet" 59 | ) 60 | 61 | # Ensure we write PROJJSON explicitly for these examples. Probably 62 | # io.read_geoparquet_table() should make sure this is set. 63 | crs = pyproj.CRS(tab["geometry"].type.crs) 64 | tab = pa.table({"geometry": ga.with_crs(tab["geometry"], crs)}) 65 | with ipc.new_stream(out, tab.schema) as writer: 66 | writer.write_table(tab) 67 | 68 | 69 | def write_fgb(): 70 | for label in CRS_LABELS: 71 | out = here / "files" / f"example-crs_vermont-{label}.fgb" 72 | 73 | tab = io.read_geoparquet_table( 74 | here / "files" / f"example-crs_vermont-{label}_geo.parquet" 75 | ) 76 | 77 | # geoarrow-rust needs "native" and not WKB-encoding 78 | tab = pa.table({"geometry": ga.as_geoarrow(tab["geometry"])}) 79 | with open(out, "wb") as f: 80 | write_flatgeobuf(tab, f, write_index=False) 81 | 82 | 83 | def write_geoarrow_alternative_crses(): 84 | tab = io.read_geoparquet_table(here / "files" / "example-crs_vermont-crs84_geo.parquet") 85 | 86 | # Construct these metadatas by hand since that's the whole point of this data 87 | extension_metadata = { 88 | "wkt2": { 89 | "crs": pyproj.CRS(tab["geometry"].type.crs).to_wkt(), 90 | "crs_type": "wkt2", 91 | }, 92 | "auth-code": {"crs": "OGC:CRS84", "crs_type": "authority_code"}, 93 | "unknown": {"crs": "OGC:CRS84"}, 94 | } 95 | 96 | for name, ext_metadata in extension_metadata.items(): 97 | metadata = { 98 | "ARROW:extension:name": "geoarrow.wkb", 99 | "ARROW:extension:metadata": json.dumps(ext_metadata), 100 | } 101 | schema = pa.schema([pa.field("geometry", pa.binary(), metadata=metadata)]) 102 | tab_out = pa.table([tab["geometry"].chunk(0).storage], schema=schema) 103 | out = here / "files" / f"example-crs_vermont-crs84-{name}_wkb.arrows" 104 | with ipc.new_stream(out, schema) as writer: 105 | writer.write_table(tab_out) 106 | 107 | 108 | if __name__ == "__main__": 109 | write_parquet() 110 | write_geoarrow() 111 | write_fgb() 112 | write_geoarrow_alternative_crses() 113 | -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-4326.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-4326.fgb -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-4326.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-4326.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-4326_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-4326_geo.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-4326_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-4326_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-auth-code.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-auth-code.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-auth-code_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-auth-code_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-unknown.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-unknown.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-unknown_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-unknown_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-wkt2.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-wkt2.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84-wkt2_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84-wkt2_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84.fgb -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84_geo.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-crs84_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-crs84_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-custom.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-custom.fgb -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-custom.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-custom.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-custom_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-custom_geo.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-custom_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-custom_wkb.arrows -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-utm.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-utm.fgb -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-utm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-utm.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-utm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-utm_geo.parquet -------------------------------------------------------------------------------- /example-crs/files/example-crs_vermont-utm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example-crs/files/example-crs_vermont-utm_wkb.arrows -------------------------------------------------------------------------------- /example-crs/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: example-crs 2 | format: 3 | - arrows/wkb 4 | - geoparquet 5 | - fgb 6 | - parquet 7 | file_location: repo 8 | files: 9 | - name: vermont-crs84 10 | - name: vermont-4326 11 | - name: vermont-utm 12 | - name: vermont-custom 13 | - name: vermont-crs84-wkt2 14 | skip_format: [geoparquet, fgb] 15 | - name: vermont-crs84-auth-code 16 | skip_format: [geoparquet, fgb] 17 | - name: vermont-crs84-unknown 18 | skip_format: [geoparquet, fgb] 19 | -------------------------------------------------------------------------------- /example/collect.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | import shutil 3 | 4 | import geoarrow.pyarrow as ga 5 | import geoarrow.types as gat 6 | import pyarrow as pa 7 | import yaml 8 | from pyarrow import ipc 9 | from geoarrow.pyarrow import io 10 | 11 | here = pathlib.Path(__file__).parent 12 | 13 | 14 | def read_examples(): 15 | examples = {} 16 | for example_yml in ["example_src", "example_src_generated"]: 17 | with open(here / f"{example_yml}.yaml") as f: 18 | examples.update(yaml.safe_load(f)) 19 | 20 | # Add one example so that we have one GEOMETRY example with mixed dimensions 21 | examples["geometry-mixed-dimensions"] = ( 22 | examples["geometry"] 23 | + examples["geometry-z"] 24 | + examples["geometry-m"] 25 | + examples["geometry-zm"] 26 | ) 27 | 28 | return examples 29 | 30 | 31 | def read_manifest(): 32 | with open(here / "manifest.yaml") as f: 33 | return yaml.safe_load(f) 34 | 35 | def write_tsv(ex, dst): 36 | with open(dst, "w") as f: 37 | f.write("geometry\n") 38 | for item in ex: 39 | f.write("" if item is None else item) 40 | f.write("\n") 41 | 42 | 43 | def write_native(ex, coord_type, dst): 44 | array = ga.as_geoarrow(ex, coord_type=coord_type) 45 | assert array.type.encoding == gat.Encoding.GEOARROW 46 | assert array.type.coord_type == coord_type 47 | 48 | table = pa.table({"wkt": ex, "geometry": array}) 49 | with ipc.new_stream(dst, table.schema) as writer: 50 | writer.write_table(table) 51 | 52 | 53 | def write_wkb(ex, dst): 54 | array = ga.as_wkb(ex) 55 | assert array.type.encoding == gat.Encoding.WKB 56 | 57 | table = pa.table({"wkt": ex, "geometry": array}) 58 | with ipc.new_stream(dst, table.schema) as writer: 59 | writer.write_table(table) 60 | 61 | 62 | def write_wkt(ex, dst): 63 | array = ga.as_wkt(ex) 64 | assert array.type.encoding == gat.Encoding.WKT 65 | 66 | table = pa.table({"wkt": ex, "geometry": array}) 67 | with ipc.new_stream(dst, table.schema) as writer: 68 | writer.write_table(table) 69 | 70 | 71 | def write_geoparquet(ex, dst): 72 | array = ga.as_wkb(ex) 73 | table = pa.table({"wkt": ex, "geometry": array}) 74 | io.write_geoparquet_table(table, dst, write_bbox=True, write_geometry_types=True) 75 | 76 | 77 | def write_geoparquet_native(ex, dst): 78 | array = ga.as_geoarrow(ex) 79 | assert array.type.encoding == gat.Encoding.GEOARROW 80 | table = pa.table({"wkt": ex, "geometry": array}) 81 | io.write_geoparquet_table( 82 | table, 83 | dst, 84 | write_bbox=True, 85 | write_geometry_types=True, 86 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 87 | ) 88 | 89 | 90 | def write_file(examples, ex_name, ex_format): 91 | ex_wkt = examples[ex_name] 92 | out_file = here / "files" / f"example_{ex_name}{SUFFIXES[ex_format]}" 93 | 94 | if ex_format == "tsv": 95 | write_tsv(ex_wkt, out_file) 96 | elif ex_format == "arrows": 97 | write_native(ex_wkt, gat.CoordType.SEPARATED, out_file) 98 | elif ex_format == "arrows/interleaved": 99 | write_native(ex_wkt, gat.CoordType.INTERLEAVED, out_file) 100 | elif ex_format == "arrows/wkb": 101 | write_wkb(ex_wkt, out_file) 102 | elif ex_format == "arrows/wkt": 103 | write_wkt(ex_wkt, out_file) 104 | elif ex_format == "geoparquet": 105 | write_geoparquet(ex_wkt, out_file) 106 | elif ex_format == "geoparquet/native": 107 | write_geoparquet_native(ex_wkt, out_file) 108 | else: 109 | raise ValueError(f"Unsupported format: {ex_format}") 110 | 111 | 112 | SUFFIXES = { 113 | "tsv": ".tsv", 114 | "arrows": ".arrows", 115 | "arrows/interleaved": "_interleaved.arrows", 116 | "arrows/wkb": "_wkb.arrows", 117 | "arrows/wkt": "_wkt.arrows", 118 | "geoparquet": "_geo.parquet", 119 | "geoparquet/native": "_native.parquet", 120 | } 121 | 122 | 123 | if __name__ == "__main__": 124 | examples = read_examples() 125 | manifest = read_manifest() 126 | 127 | # Parquet built in type is added later 128 | formats = [f for f in manifest["format"] if f != "parquet"] 129 | files = manifest["files"] 130 | 131 | if (here / "files").exists(): 132 | shutil.rmtree(here / "files") 133 | 134 | (here / "files").mkdir() 135 | 136 | for file in files: 137 | name = file["name"] 138 | skip_format = [] if "skip_format" not in file else file["skip_format"] 139 | for ex_format in formats: 140 | if ex_format in skip_format: 141 | continue 142 | write_file(examples, name, ex_format) 143 | -------------------------------------------------------------------------------- /example/example_src.yaml: -------------------------------------------------------------------------------- 1 | # These are the canonical sources for the geoarrow data "examples" files, 2 | # expressed as WKT. These values originated from the wk package for R but 3 | # have been modified: 4 | # 5 | # - Ensure two non-null, non-empty items for each geometry type 6 | # - Ensure no duplicate entries 7 | # - Add more GEOMETRYCOLLECTION items 8 | # - Added a GEOMETRY item 9 | geometry: 10 | - POINT (30 10) 11 | - LINESTRING (30 10, 10 30, 40 40) 12 | - POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) 13 | - MULTIPOINT ((30 10)) 14 | - MULTILINESTRING ((30 10, 10 30, 40 40)) 15 | - MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))) 16 | - GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 17 | 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 18 | 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 19 | - null 20 | - GEOMETRYCOLLECTION EMPTY 21 | 22 | point: 23 | - POINT (30 10) 24 | - POINT (40 20) 25 | - null 26 | - POINT EMPTY 27 | 28 | linestring: 29 | - LINESTRING (30 10, 10 30, 40 40) 30 | - LINESTRING (40 20, 20 40, 50 50) 31 | - null 32 | - LINESTRING EMPTY 33 | 34 | polygon: 35 | - POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) 36 | - POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) 37 | - null 38 | - POLYGON EMPTY 39 | 40 | multipoint: 41 | - MULTIPOINT ((30 10)) 42 | - MULTIPOINT ((10 40), (40 30), (20 20), (30 10)) 43 | - null 44 | - MULTIPOINT EMPTY 45 | 46 | multilinestring: 47 | - MULTILINESTRING ((30 10, 10 30, 40 40)) 48 | - MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)) 49 | - null 50 | - MULTILINESTRING EMPTY 51 | 52 | multipolygon: 53 | - MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))) 54 | - MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))) 55 | - MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 56 | 20 35), (30 20, 20 15, 20 25, 30 20))) 57 | - null 58 | - MULTIPOLYGON EMPTY 59 | 60 | geometrycollection: 61 | - GEOMETRYCOLLECTION (POINT (30 10)) 62 | - GEOMETRYCOLLECTION (LINESTRING (30 10, 10 30, 40 40)) 63 | - GEOMETRYCOLLECTION (POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))) 64 | - GEOMETRYCOLLECTION (MULTIPOINT ((30 10))) 65 | - GEOMETRYCOLLECTION (MULTILINESTRING ((30 10, 10 30, 40 40))) 66 | - GEOMETRYCOLLECTION (MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 67 | - GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 68 | 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 69 | 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 70 | - null 71 | - GEOMETRYCOLLECTION EMPTY 72 | 73 | geometrycollection-nested: 74 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (30 10))) 75 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (LINESTRING (30 10, 10 30, 40 40))) 76 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)))) 77 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTIPOINT ((30 10)))) 78 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTILINESTRING ((30 10, 10 30, 40 40)))) 79 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))))) 80 | - GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), 81 | POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 82 | 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))))) 83 | - null 84 | - GEOMETRYCOLLECTION EMPTY 85 | -------------------------------------------------------------------------------- /example/example_src_generated.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(wk) 3 | 4 | src <- yaml::read_yaml("example/example_src.yaml") 5 | 6 | # Check wk roundtrip to make sure we have valid WKT and that we have the WKT 7 | # that is generated by most tools 8 | for (item in src) { 9 | is_null <- vapply(item, is.null, logical(1)) 10 | item[is_null] <- NA_character_ 11 | item <- as.character(item) 12 | roundtrip <- wk_handle(wk::wkt(item), wkt_writer()) |> unclass() 13 | expect_equal(roundtrip, item) 14 | } 15 | 16 | # Generate the portion Z, M, and ZM versions of the WKT 17 | make_z <- function(item) { 18 | is_null <- vapply(item, is.null, logical(1)) 19 | item[is_null] <- NA_character_ 20 | item <- wkt(item) |> wk_set_z(1) 21 | coords <- wk_coords(item) 22 | coords$z <- coords$x + coords$y 23 | wk_coords(item) <- coords 24 | item_lst <- item |> as.character() |> as.list() 25 | item_lst[vapply(item_lst, identical, logical(1), NA_character_)] <- list(NULL) 26 | item_lst 27 | } 28 | 29 | make_m <- function(item) { 30 | is_null <- vapply(item, is.null, logical(1)) 31 | item[is_null] <- NA_character_ 32 | item <- wkt(item) |> wk_set_m(1) 33 | coords <- wk_coords(item) 34 | coords$m <- coords$x * coords$y 35 | wk_coords(item) <- coords 36 | item_lst <- item |> as.character() |> as.list() 37 | item_lst[vapply(item_lst, identical, logical(1), NA_character_)] <- list(NULL) 38 | item_lst 39 | } 40 | 41 | make_zm <- function(item) { 42 | is_null <- vapply(item, is.null, logical(1)) 43 | item[is_null] <- NA_character_ 44 | item <- wkt(item) |> wk_set_z(1) |> wk_set_m(1) 45 | coords <- wk_coords(item) 46 | coords$z <- coords$x + coords$y 47 | coords$m <- coords$x * coords$y 48 | wk_coords(item) <- coords 49 | item_lst <- item |> as.character() |> as.list() 50 | item_lst[vapply(item_lst, identical, logical(1), NA_character_)] <- list(NULL) 51 | item_lst 52 | } 53 | 54 | src_z <- lapply(src, make_z) 55 | names(src_z) <- paste0(names(src_z), "-z") 56 | src_m <- lapply(src, make_m) 57 | names(src_m) <- paste0(names(src_m), "-m") 58 | src_zm <- lapply(src, make_zm) 59 | names(src_zm) <- paste0(names(src_zm), "-zm") 60 | 61 | out <- file("example/example_src_generated.yaml", "w") 62 | writeLines("# generated by example_src_generated.R", out) 63 | yaml::write_yaml(src_z, out) 64 | yaml::write_yaml(src_m, out) 65 | yaml::write_yaml(src_zm, out) 66 | close(out) 67 | -------------------------------------------------------------------------------- /example/example_src_generated.yaml: -------------------------------------------------------------------------------- 1 | # generated by example_src_generated.R 2 | geometry-z: 3 | - POINT Z (30 10 40) 4 | - LINESTRING Z (30 10 40, 10 30 40, 40 40 80) 5 | - POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)) 6 | - MULTIPOINT Z ((30 10 40)) 7 | - MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)) 8 | - MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 9 | - GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 10 | 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT 11 | Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON 12 | Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 13 | - ~ 14 | - GEOMETRYCOLLECTION Z EMPTY 15 | point-z: 16 | - POINT Z (30 10 40) 17 | - POINT Z (40 20 60) 18 | - ~ 19 | - POINT Z EMPTY 20 | linestring-z: 21 | - LINESTRING Z (30 10 40, 10 30 40, 40 40 80) 22 | - LINESTRING Z (40 20 60, 20 40 60, 50 50 100) 23 | - ~ 24 | - LINESTRING Z EMPTY 25 | polygon-z: 26 | - POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)) 27 | - POLYGON Z ((35 10 45, 45 45 90, 15 40 55, 10 20 30, 35 10 45), (20 30 50, 35 35 28 | 70, 30 20 50, 20 30 50)) 29 | - ~ 30 | - POLYGON Z EMPTY 31 | multipoint-z: 32 | - MULTIPOINT Z ((30 10 40)) 33 | - MULTIPOINT Z ((10 40 50), (40 30 70), (20 20 40), (30 10 40)) 34 | - ~ 35 | - MULTIPOINT Z EMPTY 36 | multilinestring-z: 37 | - MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)) 38 | - MULTILINESTRING Z ((10 10 20, 20 20 40, 10 40 50), (40 40 80, 30 30 60, 40 20 60, 39 | 30 10 40)) 40 | - ~ 41 | - MULTILINESTRING Z EMPTY 42 | multipolygon-z: 43 | - MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 44 | - MULTIPOLYGON Z (((30 20 50, 45 40 85, 10 40 50, 30 20 50)), ((15 5 20, 40 10 50, 45 | 10 20 30, 5 10 15, 15 5 20))) 46 | - MULTIPOLYGON Z (((40 40 80, 20 45 65, 45 30 75, 40 40 80)), ((20 35 55, 10 30 40, 47 | 10 10 20, 30 5 35, 45 20 65, 20 35 55), (30 20 50, 20 15 35, 20 25 45, 30 20 50))) 48 | - ~ 49 | - MULTIPOLYGON Z EMPTY 50 | geometrycollection-z: 51 | - GEOMETRYCOLLECTION Z (POINT Z (30 10 40)) 52 | - GEOMETRYCOLLECTION Z (LINESTRING Z (30 10 40, 10 30 40, 40 40 80)) 53 | - GEOMETRYCOLLECTION Z (POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 54 | 40))) 55 | - GEOMETRYCOLLECTION Z (MULTIPOINT Z ((30 10 40))) 56 | - GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80))) 57 | - GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 58 | 30 10 40)))) 59 | - GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 60 | 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT 61 | Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON 62 | Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 63 | - ~ 64 | - GEOMETRYCOLLECTION Z EMPTY 65 | geometrycollection-nested-z: 66 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POINT Z (30 10 40))) 67 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (LINESTRING Z (30 10 40, 10 30 40, 40 68 | 40 80))) 69 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POLYGON Z ((30 10 40, 40 40 80, 20 40 70 | 60, 10 20 30, 30 10 40)))) 71 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTIPOINT Z ((30 10 40)))) 72 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((30 10 40, 10 30 73 | 40, 40 40 80)))) 74 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((30 10 40, 40 40 80, 75 | 20 40 60, 10 20 30, 30 10 40))))) 76 | - GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 77 | 10 40, 10 30 40, 40 40 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 78 | 30 10 40)), MULTIPOINT Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 79 | 40 80)), MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))))) 80 | - ~ 81 | - GEOMETRYCOLLECTION Z EMPTY 82 | geometry-m: 83 | - POINT M (30 10 300) 84 | - LINESTRING M (30 10 300, 10 30 300, 40 40 1600) 85 | - POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)) 86 | - MULTIPOINT M ((30 10 300)) 87 | - MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)) 88 | - MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 89 | - GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 90 | 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), 91 | MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), 92 | MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 93 | - ~ 94 | - GEOMETRYCOLLECTION M EMPTY 95 | point-m: 96 | - POINT M (30 10 300) 97 | - POINT M (40 20 800) 98 | - ~ 99 | - POINT M EMPTY 100 | linestring-m: 101 | - LINESTRING M (30 10 300, 10 30 300, 40 40 1600) 102 | - LINESTRING M (40 20 800, 20 40 800, 50 50 2500) 103 | - ~ 104 | - LINESTRING M EMPTY 105 | polygon-m: 106 | - POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)) 107 | - POLYGON M ((35 10 350, 45 45 2025, 15 40 600, 10 20 200, 35 10 350), (20 30 600, 108 | 35 35 1225, 30 20 600, 20 30 600)) 109 | - ~ 110 | - POLYGON M EMPTY 111 | multipoint-m: 112 | - MULTIPOINT M ((30 10 300)) 113 | - MULTIPOINT M ((10 40 400), (40 30 1200), (20 20 400), (30 10 300)) 114 | - ~ 115 | - MULTIPOINT M EMPTY 116 | multilinestring-m: 117 | - MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)) 118 | - MULTILINESTRING M ((10 10 100, 20 20 400, 10 40 400), (40 40 1600, 30 30 900, 40 119 | 20 800, 30 10 300)) 120 | - ~ 121 | - MULTILINESTRING M EMPTY 122 | multipolygon-m: 123 | - MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 124 | - MULTIPOLYGON M (((30 20 600, 45 40 1800, 10 40 400, 30 20 600)), ((15 5 75, 40 10 125 | 400, 10 20 200, 5 10 50, 15 5 75))) 126 | - MULTIPOLYGON M (((40 40 1600, 20 45 900, 45 30 1350, 40 40 1600)), ((20 35 700, 127 | 10 30 300, 10 10 100, 30 5 150, 45 20 900, 20 35 700), (30 20 600, 20 15 300, 20 128 | 25 500, 30 20 600))) 129 | - ~ 130 | - MULTIPOLYGON M EMPTY 131 | geometrycollection-m: 132 | - GEOMETRYCOLLECTION M (POINT M (30 10 300)) 133 | - GEOMETRYCOLLECTION M (LINESTRING M (30 10 300, 10 30 300, 40 40 1600)) 134 | - GEOMETRYCOLLECTION M (POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 135 | 10 300))) 136 | - GEOMETRYCOLLECTION M (MULTIPOINT M ((30 10 300))) 137 | - GEOMETRYCOLLECTION M (MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600))) 138 | - GEOMETRYCOLLECTION M (MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 139 | 200, 30 10 300)))) 140 | - GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 141 | 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), 142 | MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), 143 | MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 144 | - ~ 145 | - GEOMETRYCOLLECTION M EMPTY 146 | geometrycollection-nested-m: 147 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POINT M (30 10 300))) 148 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (LINESTRING M (30 10 300, 10 30 300, 149 | 40 40 1600))) 150 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POLYGON M ((30 10 300, 40 40 1600, 20 151 | 40 800, 10 20 200, 30 10 300)))) 152 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTIPOINT M ((30 10 300)))) 153 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTILINESTRING M ((30 10 300, 10 30 154 | 300, 40 40 1600)))) 155 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTIPOLYGON M (((30 10 300, 40 40 1600, 156 | 20 40 800, 10 20 200, 30 10 300))))) 157 | - GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 158 | 10 300, 10 30 300, 40 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 159 | 20 200, 30 10 300)), MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 160 | 10 30 300, 40 40 1600)), MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 161 | 20 200, 30 10 300))))) 162 | - ~ 163 | - GEOMETRYCOLLECTION M EMPTY 164 | geometry-zm: 165 | - POINT ZM (30 10 40 300) 166 | - LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600) 167 | - POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)) 168 | - MULTIPOINT ZM ((30 10 40 300)) 169 | - MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)) 170 | - MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 171 | 40 300))) 172 | - GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 173 | 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 174 | 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM 175 | ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 176 | 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 177 | - ~ 178 | - GEOMETRYCOLLECTION ZM EMPTY 179 | point-zm: 180 | - POINT ZM (30 10 40 300) 181 | - POINT ZM (40 20 60 800) 182 | - ~ 183 | - POINT ZM EMPTY 184 | linestring-zm: 185 | - LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600) 186 | - LINESTRING ZM (40 20 60 800, 20 40 60 800, 50 50 100 2500) 187 | - ~ 188 | - LINESTRING ZM EMPTY 189 | polygon-zm: 190 | - POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)) 191 | - POLYGON ZM ((35 10 45 350, 45 45 90 2025, 15 40 55 600, 10 20 30 200, 35 10 45 350), 192 | (20 30 50 600, 35 35 70 1225, 30 20 50 600, 20 30 50 600)) 193 | - ~ 194 | - POLYGON ZM EMPTY 195 | multipoint-zm: 196 | - MULTIPOINT ZM ((30 10 40 300)) 197 | - MULTIPOINT ZM ((10 40 50 400), (40 30 70 1200), (20 20 40 400), (30 10 40 300)) 198 | - ~ 199 | - MULTIPOINT ZM EMPTY 200 | multilinestring-zm: 201 | - MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)) 202 | - MULTILINESTRING ZM ((10 10 20 100, 20 20 40 400, 10 40 50 400), (40 40 80 1600, 203 | 30 30 60 900, 40 20 60 800, 30 10 40 300)) 204 | - ~ 205 | - MULTILINESTRING ZM EMPTY 206 | multipolygon-zm: 207 | - MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 208 | 40 300))) 209 | - MULTIPOLYGON ZM (((30 20 50 600, 45 40 85 1800, 10 40 50 400, 30 20 50 600)), ((15 210 | 5 20 75, 40 10 50 400, 10 20 30 200, 5 10 15 50, 15 5 20 75))) 211 | - MULTIPOLYGON ZM (((40 40 80 1600, 20 45 65 900, 45 30 75 1350, 40 40 80 1600)), 212 | ((20 35 55 700, 10 30 40 300, 10 10 20 100, 30 5 35 150, 45 20 65 900, 20 35 55 213 | 700), (30 20 50 600, 20 15 35 300, 20 25 45 500, 30 20 50 600))) 214 | - ~ 215 | - MULTIPOLYGON ZM EMPTY 216 | geometrycollection-zm: 217 | - GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300)) 218 | - GEOMETRYCOLLECTION ZM (LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600)) 219 | - GEOMETRYCOLLECTION ZM (POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 220 | 20 30 200, 30 10 40 300))) 221 | - GEOMETRYCOLLECTION ZM (MULTIPOINT ZM ((30 10 40 300))) 222 | - GEOMETRYCOLLECTION ZM (MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 223 | 1600))) 224 | - GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 225 | 800, 10 20 30 200, 30 10 40 300)))) 226 | - GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 227 | 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 228 | 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM 229 | ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 230 | 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 231 | - ~ 232 | - GEOMETRYCOLLECTION ZM EMPTY 233 | geometrycollection-nested-zm: 234 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300))) 235 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (LINESTRING ZM (30 10 40 300, 10 30 236 | 40 300, 40 40 80 1600))) 237 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POLYGON ZM ((30 10 40 300, 40 40 80 238 | 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 239 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTIPOINT ZM ((30 10 40 300)))) 240 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTILINESTRING ZM ((30 10 40 300, 241 | 10 30 40 300, 40 40 80 1600)))) 242 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((30 10 40 300, 40 243 | 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))))) 244 | - GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING 245 | ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 246 | 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), 247 | MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM 248 | (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))))) 249 | - ~ 250 | - GEOMETRYCOLLECTION ZM EMPTY 251 | -------------------------------------------------------------------------------- /example/files/example_geometry-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-m.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT M (30 10 300) 3 | LINESTRING M (30 10 300, 10 30 300, 40 40 1600) 4 | POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)) 5 | MULTIPOINT M ((30 10 300)) 6 | MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)) 7 | MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 8 | GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 9 | 10 | GEOMETRYCOLLECTION M EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometry-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-mixed-dimensions.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-mixed-dimensions.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-mixed-dimensions.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT (30 10) 3 | LINESTRING (30 10, 10 30, 40 40) 4 | POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) 5 | MULTIPOINT ((30 10)) 6 | MULTILINESTRING ((30 10, 10 30, 40 40)) 7 | MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))) 8 | GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 9 | 10 | GEOMETRYCOLLECTION EMPTY 11 | POINT Z (30 10 40) 12 | LINESTRING Z (30 10 40, 10 30 40, 40 40 80) 13 | POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)) 14 | MULTIPOINT Z ((30 10 40)) 15 | MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)) 16 | MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 17 | GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 18 | 19 | GEOMETRYCOLLECTION Z EMPTY 20 | POINT M (30 10 300) 21 | LINESTRING M (30 10 300, 10 30 300, 40 40 1600) 22 | POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)) 23 | MULTIPOINT M ((30 10 300)) 24 | MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)) 25 | MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 26 | GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 27 | 28 | GEOMETRYCOLLECTION M EMPTY 29 | POINT ZM (30 10 40 300) 30 | LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600) 31 | POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)) 32 | MULTIPOINT ZM ((30 10 40 300)) 33 | MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)) 34 | MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))) 35 | GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 36 | 37 | GEOMETRYCOLLECTION ZM EMPTY 38 | -------------------------------------------------------------------------------- /example/files/example_geometry-mixed-dimensions_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-mixed-dimensions_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-mixed-dimensions_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-mixed-dimensions_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-mixed-dimensions_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-mixed-dimensions_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-z.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT Z (30 10 40) 3 | LINESTRING Z (30 10 40, 10 30 40, 40 40 80) 4 | POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)) 5 | MULTIPOINT Z ((30 10 40)) 6 | MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)) 7 | MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 8 | GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 9 | 10 | GEOMETRYCOLLECTION Z EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometry-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-zm.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT ZM (30 10 40 300) 3 | LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600) 4 | POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)) 5 | MULTIPOINT ZM ((30 10 40 300)) 6 | MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)) 7 | MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))) 8 | GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 9 | 10 | GEOMETRYCOLLECTION ZM EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometry-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometry-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometry-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometry.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry.parquet -------------------------------------------------------------------------------- /example/files/example_geometry.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT (30 10) 3 | LINESTRING (30 10, 10 30, 40 40) 4 | POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) 5 | MULTIPOINT ((30 10)) 6 | MULTILINESTRING ((30 10, 10 30, 40 40)) 7 | MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))) 8 | GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 9 | 10 | GEOMETRYCOLLECTION EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometry_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometry_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometry_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometry_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-m.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION M (POINT M (30 10 300)) 3 | GEOMETRYCOLLECTION M (LINESTRING M (30 10 300, 10 30 300, 40 40 1600)) 4 | GEOMETRYCOLLECTION M (POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 5 | GEOMETRYCOLLECTION M (MULTIPOINT M ((30 10 300))) 6 | GEOMETRYCOLLECTION M (MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600))) 7 | GEOMETRYCOLLECTION M (MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 8 | GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 9 | 10 | GEOMETRYCOLLECTION M EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-m.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POINT M (30 10 300))) 3 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (LINESTRING M (30 10 300, 10 30 300, 40 40 1600))) 4 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)))) 5 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTIPOINT M ((30 10 300)))) 6 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)))) 7 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))))) 8 | GEOMETRYCOLLECTION M (GEOMETRYCOLLECTION M (POINT M (30 10 300), LINESTRING M (30 10 300, 10 30 300, 40 40 1600), POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)), MULTIPOINT M ((30 10 300)), MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)), MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))))) 9 | 10 | GEOMETRYCOLLECTION M EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-z.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POINT Z (30 10 40))) 3 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (LINESTRING Z (30 10 40, 10 30 40, 40 40 80))) 4 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 5 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTIPOINT Z ((30 10 40)))) 6 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)))) 7 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))))) 8 | GEOMETRYCOLLECTION Z (GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))))) 9 | 10 | GEOMETRYCOLLECTION Z EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-zm.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300))) 3 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600))) 4 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 5 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTIPOINT ZM ((30 10 40 300)))) 6 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)))) 7 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))))) 8 | GEOMETRYCOLLECTION ZM (GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))))) 9 | 10 | GEOMETRYCOLLECTION ZM EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (30 10))) 3 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (LINESTRING (30 10, 10 30, 40 40))) 4 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)))) 5 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTIPOINT ((30 10)))) 6 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTILINESTRING ((30 10, 10 30, 40 40)))) 7 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))))) 8 | GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))))) 9 | 10 | GEOMETRYCOLLECTION EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-nested_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-nested_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-z.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION Z (POINT Z (30 10 40)) 3 | GEOMETRYCOLLECTION Z (LINESTRING Z (30 10 40, 10 30 40, 40 40 80)) 4 | GEOMETRYCOLLECTION Z (POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 5 | GEOMETRYCOLLECTION Z (MULTIPOINT Z ((30 10 40))) 6 | GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80))) 7 | GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 8 | GEOMETRYCOLLECTION Z (POINT Z (30 10 40), LINESTRING Z (30 10 40, 10 30 40, 40 40 80), POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)), MULTIPOINT Z ((30 10 40)), MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)), MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)))) 9 | 10 | GEOMETRYCOLLECTION Z EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-zm.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300)) 3 | GEOMETRYCOLLECTION ZM (LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600)) 4 | GEOMETRYCOLLECTION ZM (POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))) 5 | GEOMETRYCOLLECTION ZM (MULTIPOINT ZM ((30 10 40 300))) 6 | GEOMETRYCOLLECTION ZM (MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600))) 7 | GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 8 | GEOMETRYCOLLECTION ZM (POINT ZM (30 10 40 300), LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600), POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)), MULTIPOINT ZM ((30 10 40 300)), MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)), MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)))) 9 | 10 | GEOMETRYCOLLECTION ZM EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | GEOMETRYCOLLECTION (POINT (30 10)) 3 | GEOMETRYCOLLECTION (LINESTRING (30 10, 10 30, 40 40)) 4 | GEOMETRYCOLLECTION (POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))) 5 | GEOMETRYCOLLECTION (MULTIPOINT ((30 10))) 6 | GEOMETRYCOLLECTION (MULTILINESTRING ((30 10, 10 30, 40 40))) 7 | GEOMETRYCOLLECTION (MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 8 | GEOMETRYCOLLECTION (POINT (30 10), LINESTRING (30 10, 10 30, 40 40), POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)), MULTIPOINT ((30 10)), MULTILINESTRING ((30 10, 10 30, 40 40)), MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10)))) 9 | 10 | GEOMETRYCOLLECTION EMPTY 11 | -------------------------------------------------------------------------------- /example/files/example_geometrycollection_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection_geo.parquet -------------------------------------------------------------------------------- /example/files/example_geometrycollection_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_geometrycollection_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_geometrycollection_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | LINESTRING M (30 10 300, 10 30 300, 40 40 1600) 3 | LINESTRING M (40 20 800, 20 40 800, 50 50 2500) 4 | 5 | LINESTRING M EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_linestring-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | LINESTRING Z (30 10 40, 10 30 40, 40 40 80) 3 | LINESTRING Z (40 20 60, 20 40 60, 50 50 100) 4 | 5 | LINESTRING Z EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_linestring-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | LINESTRING ZM (30 10 40 300, 10 30 40 300, 40 40 80 1600) 3 | LINESTRING ZM (40 20 60 800, 20 40 60 800, 50 50 100 2500) 4 | 5 | LINESTRING ZM EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_linestring-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_linestring-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_linestring-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_linestring.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring.arrows -------------------------------------------------------------------------------- /example/files/example_linestring.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring.parquet -------------------------------------------------------------------------------- /example/files/example_linestring.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | LINESTRING (30 10, 10 30, 40 40) 3 | LINESTRING (40 20, 20 40, 50 50) 4 | 5 | LINESTRING EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_linestring_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring_geo.parquet -------------------------------------------------------------------------------- /example/files/example_linestring_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_linestring_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring_native.parquet -------------------------------------------------------------------------------- /example/files/example_linestring_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_linestring_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_linestring_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTILINESTRING M ((30 10 300, 10 30 300, 40 40 1600)) 3 | MULTILINESTRING M ((10 10 100, 20 20 400, 10 40 400), (40 40 1600, 30 30 900, 40 20 800, 30 10 300)) 4 | 5 | MULTILINESTRING M EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multilinestring-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTILINESTRING Z ((30 10 40, 10 30 40, 40 40 80)) 3 | MULTILINESTRING Z ((10 10 20, 20 20 40, 10 40 50), (40 40 80, 30 30 60, 40 20 60, 30 10 40)) 4 | 5 | MULTILINESTRING Z EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multilinestring-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTILINESTRING ZM ((30 10 40 300, 10 30 40 300, 40 40 80 1600)) 3 | MULTILINESTRING ZM ((10 10 20 100, 20 20 40 400, 10 40 50 400), (40 40 80 1600, 30 30 60 900, 40 20 60 800, 30 10 40 300)) 4 | 5 | MULTILINESTRING ZM EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTILINESTRING ((30 10, 10 30, 40 40)) 3 | MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)) 4 | 5 | MULTILINESTRING EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multilinestring_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring_native.parquet -------------------------------------------------------------------------------- /example/files/example_multilinestring_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multilinestring_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multilinestring_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOINT M ((30 10 300)) 3 | MULTIPOINT M ((10 40 400), (40 30 1200), (20 20 400), (30 10 300)) 4 | 5 | MULTIPOINT M EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multipoint-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOINT Z ((30 10 40)) 3 | MULTIPOINT Z ((10 40 50), (40 30 70), (20 20 40), (30 10 40)) 4 | 5 | MULTIPOINT Z EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multipoint-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOINT ZM ((30 10 40 300)) 3 | MULTIPOINT ZM ((10 40 50 400), (40 30 70 1200), (20 20 40 400), (30 10 40 300)) 4 | 5 | MULTIPOINT ZM EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multipoint-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOINT ((30 10)) 3 | MULTIPOINT ((10 40), (40 30), (20 20), (30 10)) 4 | 5 | MULTIPOINT EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_multipoint_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipoint_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipoint_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipoint_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOLYGON M (((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300))) 3 | MULTIPOLYGON M (((30 20 600, 45 40 1800, 10 40 400, 30 20 600)), ((15 5 75, 40 10 400, 10 20 200, 5 10 50, 15 5 75))) 4 | MULTIPOLYGON M (((40 40 1600, 20 45 900, 45 30 1350, 40 40 1600)), ((20 35 700, 10 30 300, 10 10 100, 30 5 150, 45 20 900, 20 35 700), (30 20 600, 20 15 300, 20 25 500, 30 20 600))) 5 | 6 | MULTIPOLYGON M EMPTY 7 | -------------------------------------------------------------------------------- /example/files/example_multipolygon-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOLYGON Z (((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40))) 3 | MULTIPOLYGON Z (((30 20 50, 45 40 85, 10 40 50, 30 20 50)), ((15 5 20, 40 10 50, 10 20 30, 5 10 15, 15 5 20))) 4 | MULTIPOLYGON Z (((40 40 80, 20 45 65, 45 30 75, 40 40 80)), ((20 35 55, 10 30 40, 10 10 20, 30 5 35, 45 20 65, 20 35 55), (30 20 50, 20 15 35, 20 25 45, 30 20 50))) 5 | 6 | MULTIPOLYGON Z EMPTY 7 | -------------------------------------------------------------------------------- /example/files/example_multipolygon-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOLYGON ZM (((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300))) 3 | MULTIPOLYGON ZM (((30 20 50 600, 45 40 85 1800, 10 40 50 400, 30 20 50 600)), ((15 5 20 75, 40 10 50 400, 10 20 30 200, 5 10 15 50, 15 5 20 75))) 4 | MULTIPOLYGON ZM (((40 40 80 1600, 20 45 65 900, 45 30 75 1350, 40 40 80 1600)), ((20 35 55 700, 10 30 40 300, 10 10 20 100, 30 5 35 150, 45 20 65 900, 20 35 55 700), (30 20 50 600, 20 15 35 300, 20 25 45 500, 30 20 50 600))) 5 | 6 | MULTIPOLYGON ZM EMPTY 7 | -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | MULTIPOLYGON (((30 10, 40 40, 20 40, 10 20, 30 10))) 3 | MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))) 4 | MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20))) 5 | 6 | MULTIPOLYGON EMPTY 7 | -------------------------------------------------------------------------------- /example/files/example_multipolygon_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon_geo.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon_native.parquet -------------------------------------------------------------------------------- /example/files/example_multipolygon_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_multipolygon_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_multipolygon_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_point-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m.arrows -------------------------------------------------------------------------------- /example/files/example_point-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m.parquet -------------------------------------------------------------------------------- /example/files/example_point-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT M (30 10 300) 3 | POINT M (40 20 800) 4 | 5 | POINT M EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_point-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_point-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_point-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_point-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_point-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_point-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z.arrows -------------------------------------------------------------------------------- /example/files/example_point-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z.parquet -------------------------------------------------------------------------------- /example/files/example_point-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT Z (30 10 40) 3 | POINT Z (40 20 60) 4 | 5 | POINT Z EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_point-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_point-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_point-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_point-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_point-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_point-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm.arrows -------------------------------------------------------------------------------- /example/files/example_point-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm.parquet -------------------------------------------------------------------------------- /example/files/example_point-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT ZM (30 10 40 300) 3 | POINT ZM (40 20 60 800) 4 | 5 | POINT ZM EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_point-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_point-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_point-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_point-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_point-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_point.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point.arrows -------------------------------------------------------------------------------- /example/files/example_point.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point.parquet -------------------------------------------------------------------------------- /example/files/example_point.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POINT (30 10) 3 | POINT (40 20) 4 | 5 | POINT EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_point_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point_geo.parquet -------------------------------------------------------------------------------- /example/files/example_point_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_point_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point_native.parquet -------------------------------------------------------------------------------- /example/files/example_point_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_point_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_point_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-m.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-m.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-m.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POLYGON M ((30 10 300, 40 40 1600, 20 40 800, 10 20 200, 30 10 300)) 3 | POLYGON M ((35 10 350, 45 45 2025, 15 40 600, 10 20 200, 35 10 350), (20 30 600, 35 35 1225, 30 20 600, 20 30 600)) 4 | 5 | POLYGON M EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_polygon-m_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m_geo.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-m_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-m_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m_native.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-m_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-m_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-m_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-z.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-z.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-z.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POLYGON Z ((30 10 40, 40 40 80, 20 40 60, 10 20 30, 30 10 40)) 3 | POLYGON Z ((35 10 45, 45 45 90, 15 40 55, 10 20 30, 35 10 45), (20 30 50, 35 35 70, 30 20 50, 20 30 50)) 4 | 5 | POLYGON Z EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_polygon-z_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z_geo.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-z_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-z_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z_native.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-z_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-z_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-z_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-zm.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-zm.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-zm.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POLYGON ZM ((30 10 40 300, 40 40 80 1600, 20 40 60 800, 10 20 30 200, 30 10 40 300)) 3 | POLYGON ZM ((35 10 45 350, 45 45 90 2025, 15 40 55 600, 10 20 30 200, 35 10 45 350), (20 30 50 600, 35 35 70 1225, 30 20 50 600, 20 30 50 600)) 4 | 5 | POLYGON ZM EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_polygon-zm_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm_geo.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-zm_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-zm_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm_native.parquet -------------------------------------------------------------------------------- /example/files/example_polygon-zm_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_polygon-zm_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon-zm_wkt.arrows -------------------------------------------------------------------------------- /example/files/example_polygon.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon.arrows -------------------------------------------------------------------------------- /example/files/example_polygon.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon.parquet -------------------------------------------------------------------------------- /example/files/example_polygon.tsv: -------------------------------------------------------------------------------- 1 | geometry 2 | POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) 3 | POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) 4 | 5 | POLYGON EMPTY 6 | -------------------------------------------------------------------------------- /example/files/example_polygon_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon_geo.parquet -------------------------------------------------------------------------------- /example/files/example_polygon_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon_interleaved.arrows -------------------------------------------------------------------------------- /example/files/example_polygon_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon_native.parquet -------------------------------------------------------------------------------- /example/files/example_polygon_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon_wkb.arrows -------------------------------------------------------------------------------- /example/files/example_polygon_wkt.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/example/files/example_polygon_wkt.arrows -------------------------------------------------------------------------------- /example/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: example 2 | format: 3 | - tsv 4 | - arrows 5 | - arrows/interleaved 6 | - arrows/wkt 7 | - arrows/wkb 8 | - parquet 9 | - geoparquet 10 | - geoparquet/native 11 | file_location: repo 12 | files: 13 | - name: geometry 14 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 15 | - name: point 16 | - name: linestring 17 | - name: polygon 18 | - name: multipoint 19 | - name: multilinestring 20 | - name: multipolygon 21 | - name: geometrycollection 22 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 23 | - name: geometrycollection-nested 24 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 25 | - name: geometry-z 26 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 27 | - name: point-z 28 | - name: linestring-z 29 | - name: polygon-z 30 | - name: multipoint-z 31 | - name: multilinestring-z 32 | - name: multipolygon-z 33 | - name: geometrycollection-z 34 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 35 | - name: geometrycollection-nested-z 36 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 37 | - name: geometry-m 38 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 39 | - name: point-m 40 | - name: linestring-m 41 | - name: polygon-m 42 | - name: multipoint-m 43 | - name: multilinestring-m 44 | - name: multipolygon-m 45 | - name: geometrycollection-m 46 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 47 | - name: geometrycollection-nested-m 48 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 49 | - name: geometry-zm 50 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 51 | - name: point-zm 52 | - name: linestring-zm 53 | - name: polygon-zm 54 | - name: multipoint-zm 55 | - name: multilinestring-zm 56 | - name: multipolygon-zm 57 | - name: geometrycollection-zm 58 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 59 | - name: geometrycollection-nested-zm 60 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 61 | - name: geometry-mixed-dimensions 62 | skip_format: [arrows, arrows/interleaved, geoparquet/native] 63 | -------------------------------------------------------------------------------- /geoarrow-data.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | -------------------------------------------------------------------------------- /microsoft-buildings/.gitignore: -------------------------------------------------------------------------------- 1 | by_state 2 | files/ 3 | -------------------------------------------------------------------------------- /microsoft-buildings/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Microsoft U.S. Building Footprints 3 | 4 | The [Microsoft U.S. Building Footprints](https://github.com/microsoft/USBuildingFootprints) data set is a collection of ~130 million polygon outlines of buildings derived from satellite imagery. The version of the data set in this repository is does not include Alaska or Hawaii, is repackaged as a single point for each building, and compressed using ZSTD compression to minimize file size and facilitate downloading. 5 | 6 | The original data is licensed under the [Open Data Commons Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/) and is made available here under the same license. 7 | 8 | 9 | 10 | 11 | ## Files 12 | 13 | - point ([fgb/zip](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point.fgb.zip), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point.parquet)) 14 | -------------------------------------------------------------------------------- /microsoft-buildings/collect.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import urllib.request 4 | import zipfile 5 | from concurrent.futures import ProcessPoolExecutor, as_completed 6 | from pathlib import Path 7 | 8 | import duckdb 9 | import geoarrow.pyarrow as ga 10 | import geoarrow.types as gat 11 | import pyarrow as pa 12 | import pyarrow.compute as pc 13 | from geoarrow.pyarrow import io 14 | from geoarrow.rust.compute import centroid 15 | from geoarrow.rust.io import read_geojson, write_parquet 16 | from pyarrow import ipc, parquet 17 | import pyogrio 18 | import pyproj 19 | 20 | here = Path(__file__).parent 21 | 22 | url_base = "https://minedbuildings.z5.web.core.windows.net/legacy/usbuildings-v2" 23 | cache = here / "by_state" 24 | 25 | 26 | def download_geojson_zip(state, lazy=True): 27 | url = f"{url_base}/{state}.geojson.zip" 28 | dst = cache / f"{state}.geojson.zip" 29 | if lazy and dst.exists(): 30 | return state 31 | 32 | dst_tmp = f"{dst}.tmp" 33 | with urllib.request.urlopen(url) as fin, open(dst_tmp, "wb") as fout: 34 | shutil.copyfileobj(fin, fout) 35 | 36 | if dst.exists(): 37 | os.unlink(dst) 38 | 39 | os.rename(dst_tmp, dst) 40 | return state 41 | 42 | 43 | def read_geojson_zip(state, ndigits=8): 44 | src = cache / f"{state}.geojson.zip" 45 | with zipfile.ZipFile(src) as fzip: 46 | with fzip.open(fzip.namelist()[0]) as f: 47 | tab = read_geojson(f) 48 | centres = centroid(tab["geometry"]) 49 | 50 | # Round to ndigits decimal places 51 | centres = pa.chunked_array(centres) 52 | assert centres.type.coord_type == ga.CoordType.INTERLEAVED 53 | assert centres.type.dimensions == ga.Dimensions.XY 54 | storage_out = [] 55 | for chunk in centres.chunks: 56 | values = pc.round(chunk.storage.values, ndigits) 57 | storage = pa.FixedSizeListArray.from_arrays( 58 | values, type=centres.type.storage_type 59 | ) 60 | storage_out.append(storage) 61 | 62 | storage = pa.chunked_array(storage_out, centres.type.storage_type) 63 | return state, centres.type.wrap_array(storage) 64 | 65 | 66 | def cache_state_geoparquet(state, ndigits=8, lazy=True): 67 | out = cache / f"{state}.parquet" 68 | out_tmp = cache / f"{state}.parquet.tmp" 69 | if lazy and out.exists(): 70 | return state 71 | 72 | state, centres = read_geojson_zip(state, ndigits) 73 | tab = pa.table({"geometry": centres}) 74 | 75 | write_parquet(tab, out_tmp) 76 | os.rename(out_tmp, out) 77 | return state 78 | 79 | 80 | def write_geoparquet(lazy=True): 81 | out = here / "files" / "microsoft-buildings_point_geo.parquet" 82 | out_tmp = here / "files" / "microsoft-buildings_point_geo.parquet.tmp" 83 | if lazy and out.exists(): 84 | return 85 | 86 | with duckdb.connect() as con: 87 | con.load_extension("spatial") 88 | glob_in = here / "by_state" / "*.parquet" 89 | con.sql( 90 | f""" 91 | COPY (SELECT * 92 | FROM "{glob_in}" 93 | ORDER BY ST_Hilbert( 94 | geometry, 95 | ( 96 | SELECT ST_Extent(ST_Extent_Agg(COLUMNS(geometry)))::BOX_2D 97 | FROM "{glob_in}" 98 | ) 99 | )) TO '{out_tmp}' (FORMAT 'parquet', COMPRESSION 'zstd', ROW_GROUP_SIZE '100000'); 100 | """ 101 | ) 102 | 103 | os.rename(out_tmp, out) 104 | 105 | 106 | def convert_arrow(tab_wkb, type): 107 | geom = tab_wkb["geometry"] 108 | assert geom.type == pa.binary() 109 | 110 | if type.encoding == ga.Encoding.WKB: 111 | geom = type.with_crs(ga.OGC_CRS84).wrap_array(geom) 112 | else: 113 | geom = ga.with_crs( 114 | ga.as_geoarrow(geom, coord_type=type.coord_type), ga.OGC_CRS84 115 | ) 116 | 117 | return pa.table({"geometry": geom}) 118 | 119 | 120 | def write_arrow(type, out, lazy=True): 121 | out_tmp = f"{out}.tmp" 122 | if lazy and out.exists(): 123 | return out 124 | 125 | # Process batch-by-batch to keep the same structure and ordering 126 | schema = pa.schema({"geometry": type.with_crs(ga.OGC_CRS84)}) 127 | options = ipc.IpcWriteOptions(compression="zstd") 128 | with ( 129 | parquet.ParquetFile( 130 | here / "files" / "microsoft-buildings_point_geo.parquet" 131 | ) as f, 132 | ipc.new_stream(out_tmp, schema, options=options) as writer, 133 | ): 134 | for i in range(f.num_row_groups): 135 | batch = convert_arrow(f.read_row_group(i), type) 136 | writer.write_table(batch, max_chunksize=100_000) 137 | 138 | os.rename(out_tmp, out) 139 | return out 140 | 141 | 142 | def write_geoparquet_native(lazy=True): 143 | out_tmp = here / "files" / "microsoft-buildings_point_native.parquet.tmp" 144 | out = here / "files" / "microsoft-buildings_point_native.parquet" 145 | if lazy and out.exists(): 146 | return out 147 | 148 | tab = io.read_geoparquet_table( 149 | here / "files" / "microsoft-buildings_point_geo.parquet" 150 | ) 151 | io.write_geoparquet_table( 152 | tab, 153 | out_tmp, 154 | compression="zstd", 155 | write_batch_size=100_000, 156 | write_bbox=True, 157 | write_geometry_types=True, 158 | geometry_encoding="point", 159 | ) 160 | 161 | os.rename(out_tmp, out) 162 | 163 | 164 | def write_fgb(lazy=True): 165 | out_fgb_tmp = here / "files" / "microsoft-buildings_point.fgb.tmp.fgb" 166 | out_tmp = here / "files" / "microsoft-buildings_point.fgb.zip.tmp" 167 | out = here / "files" / "microsoft-buildings_point.fgb.zip" 168 | if lazy and out.exists(): 169 | return out 170 | 171 | tab = parquet.read_table(here / "files" / "microsoft-buildings_point_geo.parquet") 172 | 173 | pyogrio.write_arrow( 174 | tab, 175 | out_fgb_tmp, 176 | geometry_name="geometry", 177 | geometry_type="Point", 178 | crs=pyproj.CRS("OGC:CRS84").to_wkt(), 179 | spatial_index=False 180 | ) 181 | 182 | with zipfile.ZipFile(out_tmp, "w", compression=zipfile.ZIP_DEFLATED) as fzip: 183 | with ( 184 | open(out_fgb_tmp, "rb") as fin, 185 | fzip.open(out.name.replace(".zip", ""), "w", force_zip64=True) as fout, 186 | ): 187 | shutil.copyfileobj(fin, fout) 188 | 189 | os.rename(out_tmp, out) 190 | return out 191 | 192 | 193 | def main(): 194 | # Out-of-memory is an issue if this is set too high (California is 195 | # the main issue) 196 | pool = ProcessPoolExecutor(max_workers=3) 197 | 198 | print("Downloading...") 199 | futures = [pool.submit(download_geojson_zip, state) for state in STATES] 200 | for future in as_completed(futures): 201 | print(future.result()) 202 | 203 | print("Converting GeoJSON footprints to GeoParquet centroids...") 204 | futures = [pool.submit(cache_state_geoparquet, state) for state in STATES] 205 | for future in as_completed(futures): 206 | print(future.result()) 207 | 208 | print("Writing GeoParquet (WKB)...") 209 | write_geoparquet() 210 | 211 | print("Writing GeoParquet (native)...") 212 | write_geoparquet_native() 213 | 214 | print("Writing FlatGeoBuf...") 215 | write_fgb() 216 | 217 | print("Writing Arrow...") 218 | futures = [] 219 | futures.append( 220 | pool.submit( 221 | write_arrow, 222 | gat.wkb().to_pyarrow(), 223 | here / "files" / "microsoft-buildings_point_wkb.arrows", 224 | ) 225 | ) 226 | futures.append( 227 | pool.submit( 228 | write_arrow, 229 | gat.point().to_pyarrow(), 230 | here / "files" / "microsoft-buildings_point.arrows", 231 | ) 232 | ) 233 | futures.append( 234 | pool.submit( 235 | write_arrow, 236 | gat.point().to_pyarrow().with_coord_type(ga.CoordType.INTERLEAVED), 237 | here / "files" / "microsoft-buildings_point_interleaved.arrows", 238 | ) 239 | ) 240 | for future in as_completed(futures): 241 | print(future.result()) 242 | 243 | 244 | # We're deliberately omitting Alaska and Hawaii here becuase we need the 245 | # output files to be <2GB for distribution via GitHub Releases, and with 246 | # both of them the _wkb.arrows output is very close to the limit 247 | STATES = [ 248 | "Alabama", 249 | "Arizona", 250 | "Arkansas", 251 | "California", 252 | "Colorado", 253 | "Connecticut", 254 | "Delaware", 255 | "DistrictofColumbia", 256 | "Florida", 257 | "Georgia", 258 | "Idaho", 259 | "Illinois", 260 | "Indiana", 261 | "Iowa", 262 | "Kansas", 263 | "Kentucky", 264 | "Louisiana", 265 | "Maine", 266 | "Maryland", 267 | "Massachusetts", 268 | "Michigan", 269 | "Minnesota", 270 | "Mississippi", 271 | "Missouri", 272 | "Montana", 273 | "Nebraska", 274 | "Nevada", 275 | "NewHampshire", 276 | "NewJersey", 277 | "NewMexico", 278 | "NewYork", 279 | "NorthCarolina", 280 | "NorthDakota", 281 | "Ohio", 282 | "Oklahoma", 283 | "Oregon", 284 | "Pennsylvania", 285 | "RhodeIsland", 286 | "SouthCarolina", 287 | "SouthDakota", 288 | "Tennessee", 289 | "Texas", 290 | "Utah", 291 | "Vermont", 292 | "Virginia", 293 | "Washington", 294 | "WestVirginia", 295 | "Wisconsin", 296 | "Wyoming", 297 | ] 298 | 299 | assert len(STATES) == 49 300 | 301 | if __name__ == "__main__": 302 | main() 303 | -------------------------------------------------------------------------------- /microsoft-buildings/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: microsoft-buildings 2 | file_location: release 3 | files: 4 | - name: point 5 | format: 6 | - fgb/zip 7 | - arrows 8 | - arrows/interleaved 9 | - arrows/wkb 10 | - geoparquet 11 | - geoparquet/native 12 | - parquet 13 | -------------------------------------------------------------------------------- /natural-earth/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Natural Earth 3 | 4 | Selected data from [Natural Earth](https://www.naturalearthdata.com/). Notably, cities and countries as examples of global data. The `countries-geography` data includes polygons that cover the antimeridian (e.g., Fiji, Russia) and a pole (e.g., Antarctica); the `countries-bounds` data includes two boxes that straddle the antimeridian using `xmax < xmin` behaviour. 5 | 6 | All versions of Natural Earth map data redistributed here are in the public domain. 7 | 8 | 9 | 10 | 11 | ## Files 12 | 13 | - cities ([fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities.fgb), [arrows](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities.arrows), [arrows/interleaved](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities_interleaved.arrows), [arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities_geo.parquet), [geoparquet/native](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities_native.parquet), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities.parquet)) 14 | - countries ([fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries.fgb), [arrows](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries.arrows), [arrows/interleaved](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_interleaved.arrows), [arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_geo.parquet), [geoparquet/native](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_native.parquet), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries.parquet)) 15 | - countries-geography ([arrows](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography.arrows), [arrows/interleaved](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography_interleaved.arrows), [arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography_geo.parquet), [geoparquet/native](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography_native.parquet), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-geography.parquet)) 16 | - countries-bounds ([fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds.fgb), [arrows](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds.arrows), [arrows/box](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds_box.arrows), [arrows/interleaved](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds_interleaved.arrows), [arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds_geo.parquet), [geoparquet/native](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds_native.parquet), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries-bounds.parquet)) 17 | -------------------------------------------------------------------------------- /natural-earth/collect.py: -------------------------------------------------------------------------------- 1 | import urllib.request 2 | from pathlib import Path 3 | 4 | import geoarrow.pyarrow as ga 5 | import geoarrow.types as gat 6 | import geopandas 7 | import pyarrow as pa 8 | from geoarrow.pyarrow import io 9 | from geoarrow.rust.io import write_flatgeobuf 10 | from pyarrow import csv, ipc 11 | 12 | # Original source: 13 | # https://www.naturalearthdata.com/ 14 | 15 | # Spherical source: 16 | # https://github.com/paleolimbot/duckdb-geography/tree/97b34f9ba2e076e25fe811e8626c1e9295c37b78/data 17 | 18 | here = Path(__file__).parent 19 | 20 | 21 | def write_cities(): 22 | cities_pd = geopandas.read_file( 23 | "https://naciscdn.org/naturalearth/110m/cultural/ne_110m_populated_places_simple.zip" 24 | ) 25 | 26 | ( 27 | cities_pd[["nameascii", "geometry"]] 28 | .rename(columns={"nameascii": "name"}) 29 | .to_parquet( 30 | here / "files" / "natural-earth_cities_geo.parquet", compression=None 31 | ) 32 | ) 33 | 34 | tab = io.read_geoparquet_table(here / "files" / "natural-earth_cities_geo.parquet") 35 | io.write_geoparquet_table( 36 | tab, 37 | here / "files" / "natural-earth_cities_native.parquet", 38 | compression="none", 39 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 40 | ) 41 | 42 | with ipc.new_stream( 43 | here / "files" / "natural-earth_cities_wkb.arrows", tab.schema 44 | ) as writer: 45 | writer.write_table(tab) 46 | 47 | tab_native = tab.set_column(1, "geometry", ga.as_geoarrow(tab["geometry"])) 48 | with ipc.new_stream( 49 | here / "files" / "natural-earth_cities.arrows", tab_native.schema 50 | ) as writer: 51 | writer.write_table(tab_native) 52 | 53 | tab_native = tab.set_column( 54 | 1, 55 | "geometry", 56 | ga.as_geoarrow(tab["geometry"], coord_type=ga.CoordType.INTERLEAVED), 57 | ) 58 | with ipc.new_stream( 59 | here / "files" / "natural-earth_cities_interleaved.arrows", tab_native.schema 60 | ) as writer: 61 | writer.write_table(tab_native) 62 | 63 | with open(here / "files" / "natural-earth_cities.fgb", "wb") as f: 64 | write_flatgeobuf(tab_native, f, write_index=False) 65 | 66 | 67 | def write_countries(): 68 | countries_pd = geopandas.read_file( 69 | "https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip" 70 | ) 71 | 72 | ( 73 | countries_pd[["ADMIN", "CONTINENT", "geometry"]] 74 | .rename(columns={"ADMIN": "name", "CONTINENT": "continent"}) 75 | .to_parquet( 76 | here / "files" / "natural-earth_countries_geo.parquet", compression=None 77 | ) 78 | ) 79 | 80 | tab = io.read_geoparquet_table( 81 | here / "files" / "natural-earth_countries_geo.parquet" 82 | ) 83 | io.write_geoparquet_table( 84 | tab, 85 | here / "files" / "natural-earth_countries_native.parquet", 86 | compression="none", 87 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 88 | ) 89 | 90 | with ipc.new_stream( 91 | here / "files" / "natural-earth_countries_wkb.arrows", tab.schema 92 | ) as writer: 93 | writer.write_table(tab) 94 | 95 | tab_native = tab.set_column(2, "geometry", ga.as_geoarrow(tab["geometry"])) 96 | with ipc.new_stream( 97 | here / "files" / "natural-earth_countries.arrows", tab_native.schema 98 | ) as writer: 99 | writer.write_table(tab_native) 100 | 101 | tab_native = tab.set_column( 102 | 2, 103 | "geometry", 104 | ga.as_geoarrow(tab["geometry"], coord_type=ga.CoordType.INTERLEAVED), 105 | ) 106 | with ipc.new_stream( 107 | here / "files" / "natural-earth_countries_interleaved.arrows", tab_native.schema 108 | ) as writer: 109 | writer.write_table(tab_native) 110 | 111 | with open(here / "files" / "natural-earth_countries.fgb", "wb") as f: 112 | write_flatgeobuf(tab_native, f, write_index=False) 113 | 114 | 115 | def write_countries_geography(): 116 | url = "https://github.com/paleolimbot/duckdb-geography/raw/refs/heads/main/data/countries.tsv" 117 | with urllib.request.urlopen(url) as f: 118 | tab = csv.read_csv(f, parse_options=csv.ParseOptions(delimiter="\t")) 119 | 120 | geom = ga.as_wkb(tab["geog"]) 121 | geom = ga.with_crs(geom, ga.OGC_CRS84) 122 | geom = ga.with_edge_type(geom, ga.EdgeType.SPHERICAL) 123 | i = tab.schema.get_field_index("geog") 124 | tab = tab.set_column(i, "geometry", geom) 125 | 126 | io.write_geoparquet_table( 127 | tab, 128 | here / "files" / "natural-earth_countries-geography_geo.parquet", 129 | compression="none", 130 | ) 131 | io.write_geoparquet_table( 132 | tab, 133 | here / "files" / "natural-earth_countries-geography_native.parquet", 134 | compression="none", 135 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 136 | ) 137 | 138 | with ipc.new_stream( 139 | here / "files" / "natural-earth_countries-geography_wkb.arrows", tab.schema 140 | ) as writer: 141 | writer.write_table(tab) 142 | 143 | tab_native = tab.set_column(2, "geometry", ga.as_geoarrow(tab["geometry"])) 144 | with ipc.new_stream( 145 | here / "files" / "natural-earth_countries-geography.arrows", tab_native.schema 146 | ) as writer: 147 | writer.write_table(tab_native) 148 | 149 | tab_native = tab.set_column( 150 | 2, 151 | "geometry", 152 | ga.as_geoarrow(tab["geometry"], coord_type=ga.CoordType.INTERLEAVED), 153 | ) 154 | with ipc.new_stream( 155 | here / "files" / "natural-earth_countries-geography_interleaved.arrows", 156 | tab_native.schema, 157 | ) as writer: 158 | writer.write_table(tab_native) 159 | 160 | 161 | def write_countries_box(): 162 | tab = io.read_geoparquet_table( 163 | here / "files" / "natural-earth_countries_geo.parquet" 164 | ) 165 | 166 | # Manually edit a few of the boxes to have max->min behaviour 167 | boxes = ga.box(tab["geometry"]) 168 | boxes_wkt = ga.as_wkt(boxes).to_pylist() 169 | py_boxes = boxes.to_pylist() 170 | for i, name in enumerate(tab["name"].to_pylist()): 171 | box = py_boxes[i] 172 | 173 | if name == "Fiji": 174 | py_boxes[i] = new_box(box, 177.28, -179.79) 175 | boxes_wkt[i] = new_box_wkt(py_boxes[i]) 176 | elif name == "Russia": 177 | py_boxes[i] = new_box(box, 19.65, -169.89) 178 | boxes_wkt[i] = new_box_wkt(py_boxes[i]) 179 | 180 | tab = tab.set_column( 181 | 2, 182 | "geometry", 183 | boxes.type.wrap_array(pa.array(py_boxes, boxes.type.storage_type)), 184 | ) 185 | with pa.ipc.new_stream( 186 | here / "files" / "natural-earth_countries-bounds_box.arrows", tab.schema 187 | ) as writer: 188 | writer.write_table(tab) 189 | 190 | tab_wkb = tab.set_column( 191 | 2, "geometry", ga.with_crs(ga.as_wkb(boxes_wkt), ga.OGC_CRS84) 192 | ) 193 | with ipc.new_stream( 194 | here / "files" / "natural-earth_countries-bounds_wkb.arrows", tab_wkb.schema 195 | ) as writer: 196 | writer.write_table(tab_wkb) 197 | 198 | tab_native = tab.set_column(2, "geometry", ga.as_geoarrow(tab_wkb["geometry"])) 199 | with ipc.new_stream( 200 | here / "files" / "natural-earth_countries-bounds.arrows", tab_native.schema 201 | ) as writer: 202 | writer.write_table(tab_native) 203 | 204 | tab_native = tab.set_column( 205 | 2, 206 | "geometry", 207 | ga.as_geoarrow(tab_wkb["geometry"], coord_type=ga.CoordType.INTERLEAVED), 208 | ) 209 | with ipc.new_stream( 210 | here / "files" / "natural-earth_countries-bounds_interleaved.arrows", 211 | tab_native.schema, 212 | ) as writer: 213 | writer.write_table(tab_native) 214 | 215 | io.write_geoparquet_table( 216 | tab_wkb, 217 | here / "files" / "natural-earth_countries-bounds_geo.parquet", 218 | compression="none", 219 | ) 220 | io.write_geoparquet_table( 221 | tab_wkb, 222 | here / "files" / "natural-earth_countries-bounds_native.parquet", 223 | compression="none", 224 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 225 | ) 226 | 227 | with open(here / "files" / "natural-earth_countries-bounds.fgb", "wb") as f: 228 | write_flatgeobuf(tab_native, f, write_index=False) 229 | 230 | 231 | # Tools to rewrite a box manually specifying the west/east bounds 232 | def new_box(box, xwest, xeast): 233 | return {"xmin": xwest, "ymin": box["ymin"], "xmax": xeast, "ymax": box["ymax"]} 234 | 235 | 236 | def new_box_wkt(b): 237 | box_east = {"xmin": b["xmin"], "ymin": b["ymin"], "xmax": 180.0, "ymax": b["ymax"]} 238 | box_west = {"xmin": -180.0, "ymin": b["ymin"], "xmax": b["xmax"], "ymax": b["ymax"]} 239 | box_east_storage = pa.StructArray.from_arrays( 240 | [pa.array([i]) for i in box_east.values()], names=box_east.keys() 241 | ) 242 | box_east_array = gat.box().to_pyarrow().wrap_array(box_east_storage) 243 | box_west_storage = pa.StructArray.from_arrays( 244 | [pa.array([i]) for i in box_west.values()], names=box_west.keys() 245 | ) 246 | box_west_array = gat.box().to_pyarrow().wrap_array(box_west_storage) 247 | box_east_wkt = ga.as_wkt(box_east_array)[0].as_py().replace("POLYGON ", "") 248 | box_west_wkt = ga.as_wkt(box_west_array)[0].as_py().replace("POLYGON ", "") 249 | return f"MULTIPOLYGON ({box_east_wkt}, {box_west_wkt})" 250 | 251 | 252 | if __name__ == "__main__": 253 | write_cities() 254 | write_countries() 255 | write_countries_geography() 256 | write_countries_box() 257 | -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities.fgb -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities_geo.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities_interleaved.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities_native.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_cities_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_cities_wkb.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds.fgb -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds_box.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds_box.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds_geo.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds_interleaved.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds_native.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-bounds_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-bounds_wkb.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography_geo.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography_interleaved.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography_native.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries-geography_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries-geography_wkb.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries.fgb -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries_geo.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries_interleaved.arrows -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries_native.parquet -------------------------------------------------------------------------------- /natural-earth/files/natural-earth_countries_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/natural-earth/files/natural-earth_countries_wkb.arrows -------------------------------------------------------------------------------- /natural-earth/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: natural-earth 2 | format: 3 | - fgb 4 | - arrows 5 | - arrows/box 6 | - arrows/interleaved 7 | - arrows/wkb 8 | - geoparquet 9 | - geoparquet/native 10 | - parquet 11 | file_location: repo 12 | files: 13 | - name: cities 14 | skip_format: [arrows/box] 15 | - name: countries 16 | skip_format: [arrows/box] 17 | - name: countries-geography 18 | skip_format: [fgb, arrows/box] 19 | - name: countries-bounds 20 | -------------------------------------------------------------------------------- /ns-water/.gitignore: -------------------------------------------------------------------------------- 1 | files/ 2 | cache/ 3 | -------------------------------------------------------------------------------- /ns-water/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Nova Scotia Water 3 | 4 | The Nova Scotia Water data set (i.e., the Nova Scotia Hydrographic Network) and supporting data are provided by the Nova Scotia [Geospatial Data Directory](https://nsgi.novascotia.ca/gdd/). This data includes Z values and is an example of data distributed through a mainstream channel that requires more than one identifier to capture the CRS (horizontal + vertical CRS identifiers). 5 | 6 | These data were obtained under an *Unrestricted Data Use License Agreement for Government Geographic Data* as specified by the Province of Nova Scotia [Geospatial Data Directory](https://nsgi.novascotia.ca/gdd/). 7 | 8 | 9 | 10 | 11 | ## Files 12 | 13 | - elevation ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_elevation.parquet)) 14 | - land-poly ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_land-poly.parquet)) 15 | - water-junc ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-junc.parquet)) 16 | - water-line ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line.parquet)) 17 | - water-point ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point.parquet)) 18 | - water-poly ([fgb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly.fgb), [arrows](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly.arrows), [arrows/interleaved](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly_interleaved.arrows), [arrows/wkb](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly_wkb.arrows), [geoparquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly_geo.parquet), [geoparquet/native](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly_native.parquet), [parquet](https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly.parquet)) 19 | -------------------------------------------------------------------------------- /ns-water/collect.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import urllib.request 4 | from pathlib import Path 5 | 6 | import geoarrow.pyarrow as ga 7 | import geoarrow.types as gat 8 | import geopandas 9 | import pyarrow as pa 10 | from geoarrow.pyarrow import io 11 | from pyarrow import compute as pc 12 | from pyarrow import ipc 13 | import pyogrio 14 | 15 | here = Path(__file__).parent 16 | cache = here / "cache" 17 | 18 | # https://nsgi.novascotia.ca/gdd/ 19 | 20 | # Nova Scotia Topographic Database - Digital Terrain Model (DTM) 21 | url_dtm = "https://nsgi.novascotia.ca/WSF_DDS/DDS.svc/DownloadFile?tkey=kNNpTdP4QuNRSYtt&id=36729" 22 | # unzip -l dtm.zip 23 | # Archive: dtm.zip 24 | # Length Date Time Name 25 | # --------- ---------- ----- ---- 26 | # 5 10-28-2020 16:48 LF_DTM_POINT_10K.cpg 27 | # 2127468874 10-28-2020 16:48 LF_DTM_POINT_10K.dbf 28 | # 602 04-18-2024 08:21 LF_DTM_POINT_10K.prj 29 | # 92974116 10-28-2020 17:00 LF_DTM_POINT_10K.sbn 30 | # 951180 10-28-2020 17:00 LF_DTM_POINT_10K.sbx 31 | # 503272276 10-28-2020 16:48 LF_DTM_POINT_10K.shp 32 | # 7832 04-18-2024 08:21 LF_DTM_POINT_10K.shp.xml 33 | # 91504132 10-28-2020 16:48 LF_DTM_POINT_10K.shx 34 | # 7704576 02-21-2019 17:44 NSTDB_10k.style 35 | # 45663 11-27-2019 15:33 NSTDB_FEATURECODES.txt 36 | # 115200 11-27-2019 15:30 NSTDB_FEATURECODES.xls 37 | # 30220 02-21-2019 17:44 NSTDB_Topo.ttf 38 | # 297 03-04-2019 11:13 README.txt 39 | # --------- ------- 40 | # 2824074973 13 files 41 | 42 | # Nova Scotia Hydrographic Network (NSHN) 43 | url_nshn = "https://nsgi.novascotia.ca/WSF_DDS/DDS.svc/DownloadFile?tkey=kNNpTdP4QuNRSYtt&id=38906" 44 | # unzip -l nshn.zip 45 | # Archive: nshn.zip 46 | # Length Date Time Name 47 | # --------- ---------- ----- ---- 48 | # 117003 04-24-2019 10:11 NSHN Attribute_Specs.pdf 49 | # 12926 06-22-2020 10:01 NSHN_FEATURECODES.txt 50 | # 50688 06-22-2020 10:02 NSHN_FEATURECODES.xls 51 | # 131265 10-28-2020 18:37 nshn_v2_ba_line.dbf 52 | # 609 10-28-2020 17:39 nshn_v2_ba_line.prj 53 | # 1606352 10-28-2020 18:37 nshn_v2_ba_line.shp 54 | # 2140 10-28-2020 18:37 nshn_v2_ba_line.shx 55 | # 4472 10-28-2020 18:37 nshn_v2_ba_point.dbf 56 | # 609 10-28-2020 17:39 nshn_v2_ba_point.prj 57 | # 2124 10-28-2020 18:37 nshn_v2_ba_point.shp 58 | # 468 10-28-2020 18:37 nshn_v2_ba_point.shx 59 | # 7388 10-28-2020 18:37 nshn_v2_ba_poly.dbf 60 | # 609 10-28-2020 17:39 nshn_v2_ba_poly.prj 61 | # 2928500 10-28-2020 18:37 nshn_v2_ba_poly.shp 62 | # 468 10-28-2020 18:37 nshn_v2_ba_poly.shx 63 | # 7740300 10-28-2020 18:37 nshn_v2_la_poly.dbf 64 | # 609 10-28-2020 17:39 nshn_v2_la_poly.prj 65 | # 292054164 10-28-2020 18:37 nshn_v2_la_poly.shp 66 | # 192396 10-28-2020 18:37 nshn_v2_la_poly.shx 67 | # 3212845 10-28-2020 18:37 nshn_v2_wa_cent.dbf 68 | # 609 10-28-2020 17:40 nshn_v2_wa_cent.prj 69 | # 2570272 10-28-2020 18:37 nshn_v2_wa_cent.shp 70 | # 467404 10-28-2020 18:37 nshn_v2_wa_cent.shx 71 | # 32155778 10-28-2020 18:37 nshn_v2_wa_junc.dbf 72 | # 609 10-28-2020 17:41 nshn_v2_wa_junc.prj 73 | # 13604372 10-28-2020 18:37 nshn_v2_wa_junc.shp 74 | # 2473604 10-28-2020 18:37 nshn_v2_wa_junc.shx 75 | # 668844002 10-28-2020 18:37 nshn_v2_wa_line.dbf 76 | # 609 10-28-2020 17:47 nshn_v2_wa_line.prj 77 | # 779824044 10-28-2020 18:37 nshn_v2_wa_line.shp 78 | # 3866244 10-28-2020 18:37 nshn_v2_wa_line.shx 79 | # 6614378 10-28-2020 18:37 nshn_v2_wa_point.dbf 80 | # 609 10-28-2020 18:03 nshn_v2_wa_point.prj 81 | # 1966460 10-28-2020 18:37 nshn_v2_wa_point.shp 82 | # 357620 10-28-2020 18:37 nshn_v2_wa_point.shx 83 | # 61826578 10-28-2020 18:37 nshn_v2_wa_poly.dbf 84 | # 609 10-28-2020 18:04 nshn_v2_wa_poly.prj 85 | # 841040660 10-28-2020 18:37 nshn_v2_wa_poly.shp 86 | # 1358916 10-28-2020 18:37 nshn_v2_wa_poly.shx 87 | # 7704576 02-21-2019 16:44 NSTDB_10k.style 88 | # 45663 11-27-2019 14:33 NSTDB_FEATURECODES.txt 89 | # 115200 11-27-2019 14:30 NSTDB_FEATURECODES.xls 90 | # 30220 02-21-2019 16:44 NSTDB_Topo.ttf 91 | # 297 03-04-2019 10:13 README.txt 92 | # --------- ------- 93 | # 2732935268 44 files 94 | 95 | 96 | def download_archive(url, dst, lazy=True): 97 | if lazy and dst.exists(): 98 | return dst 99 | 100 | dst_tmp = f"{dst}.tmp" 101 | with urllib.request.urlopen(url) as fin, open(dst_tmp, "wb") as fout: 102 | shutil.copyfileobj(fin, fout) 103 | 104 | os.rename(dst_tmp, dst) 105 | return dst 106 | 107 | 108 | def read_shp(shp): 109 | tab = io.read_pyogrio_table(shp) 110 | hilbert = ga.to_geopandas(tab["geometry"]).hilbert_distance() 111 | sort_indices = pc.sort_indices(pa.array(hilbert)) 112 | return tab.take(sort_indices) 113 | 114 | 115 | def write_geoparquet(tab, out, lazy=True): 116 | if lazy and out.exists(): 117 | return out 118 | 119 | out_tmp = f"{out}.tmp" 120 | io.write_geoparquet_table( 121 | tab, 122 | out_tmp, 123 | compression="zstd", 124 | write_batch_size=100_000, 125 | write_bbox=True, 126 | write_geometry_types=True, 127 | geometry_encoding="WKB", 128 | ) 129 | os.rename(out_tmp, out) 130 | return out 131 | 132 | 133 | def write_geoparquet_native(tab, out, lazy=True): 134 | if lazy and out.exists(): 135 | return out 136 | 137 | out_tmp = f"{out}.tmp" 138 | io.write_geoparquet_table( 139 | tab, 140 | out_tmp, 141 | compression="zstd", 142 | write_batch_size=100_000, 143 | write_bbox=True, 144 | write_geometry_types=True, 145 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 146 | ) 147 | os.rename(out_tmp, out) 148 | return out 149 | 150 | 151 | def convert_arrow(tab_wkb, type): 152 | if type.encoding == ga.Encoding.WKB: 153 | return tab_wkb 154 | 155 | i = tab_wkb.schema.get_field_index("geometry") 156 | geom = ga.with_coord_type(tab_wkb["geometry"], coord_type=type.coord_type) 157 | return tab_wkb.set_column(i, "geometry", geom) 158 | 159 | 160 | def write_arrow(tab_wkb, type, out, lazy=True): 161 | if lazy and out.exists(): 162 | return out 163 | 164 | out_tmp = f"{out}.tmp" 165 | options = ipc.IpcWriteOptions(compression="zstd") 166 | tab = convert_arrow(tab_wkb, type) 167 | with ( 168 | ipc.new_stream(out_tmp, tab.schema, options=options) as writer, 169 | ): 170 | writer.write_table(tab, max_chunksize=100_000) 171 | 172 | os.rename(out_tmp, out) 173 | return out 174 | 175 | 176 | def write_fgb(tab_wkb, out, lazy=True): 177 | if lazy and out.exists(): 178 | return out 179 | 180 | out_tmp = f"{out}.tmp.fgb" 181 | 182 | df = geopandas.GeoDataFrame.from_arrow(tab_wkb) 183 | pyogrio.write_dataframe(df, out_tmp, spatial_index=False) 184 | 185 | os.rename(out_tmp, out) 186 | return out 187 | 188 | 189 | def write_files(src, name, lazy=True): 190 | print(f"Preparing {name}...") 191 | 192 | print(f"- Reading '{src}'...") 193 | tab = read_shp(src) 194 | 195 | print("- Writing geoparquet (WKB)...") 196 | write_geoparquet(tab, here / "files" / f"ns-water_{name}_geo.parquet", lazy=lazy) 197 | 198 | print("- Writing geoparquet (native)...") 199 | write_geoparquet_native( 200 | tab, here / "files" / f"ns-water_{name}_native.parquet", lazy=lazy 201 | ) 202 | 203 | print("- Writing arrows/wkb") 204 | write_arrow( 205 | tab, gat.wkb(), here / "files" / f"ns-water_{name}_wkb.arrows", lazy=lazy 206 | ) 207 | 208 | print("- Writing arrows") 209 | write_arrow( 210 | tab, 211 | gat.type_spec(coord_type=gat.CoordType.SEPARATED), 212 | here / "files" / f"ns-water_{name}.arrows", 213 | lazy=lazy, 214 | ) 215 | 216 | print("- Writing arrows/interleaved") 217 | write_arrow( 218 | tab, 219 | gat.type_spec(coord_type=gat.CoordType.INTERLEAVED), 220 | here / "files" / f"ns-water_{name}_interleaved.arrows", 221 | lazy=lazy, 222 | ) 223 | 224 | print("- Writing FlatGeoBuf") 225 | write_fgb(tab, here / "files" / f"ns-water_{name}.fgb", lazy=lazy) 226 | 227 | 228 | def extract_archive_to_cache(zip_file): 229 | os.system(f"unzip -n -d {cache} {zip_file}") 230 | 231 | 232 | if __name__ == "__main__": 233 | print("Downloading Digital Terrain Model...") 234 | download_archive(url_dtm, cache / "dtm.zip") 235 | 236 | print("Downloading Hydro Network...") 237 | download_archive(url_nshn, cache / "nshn.zip") 238 | 239 | print("Extracting archives...") 240 | extract_archive_to_cache(cache / "dtm.zip") 241 | extract_archive_to_cache(cache / "nshn.zip") 242 | 243 | assets = { 244 | "elevation": "LF_DTM_POINT_10K.shp", 245 | "water-junc": "nshn_v2_wa_junc.shp", 246 | "water-poly": "nshn_v2_wa_poly.shp", 247 | "water-point": "nshn_v2_wa_point.shp", 248 | "water-line": "nshn_v2_wa_line.shp", 249 | "land-poly": "nshn_v2_la_poly.shp", 250 | } 251 | 252 | for name, shp in assets.items(): 253 | write_files(cache / shp, name, lazy=False) 254 | -------------------------------------------------------------------------------- /ns-water/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: ns-water 2 | format: 3 | - fgb 4 | - arrows 5 | - arrows/interleaved 6 | - arrows/wkb 7 | - geoparquet 8 | - geoparquet/native 9 | - parquet 10 | file_location: release 11 | files: 12 | - name: elevation 13 | - name: land-poly 14 | - name: water-junc 15 | - name: water-line 16 | - name: water-point 17 | - name: water-poly 18 | -------------------------------------------------------------------------------- /ns-water/ns-water-attribute_specs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/ns-water/ns-water-attribute_specs.pdf -------------------------------------------------------------------------------- /quadrangles/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | -------------------------------------------------------------------------------- /quadrangles/README.md: -------------------------------------------------------------------------------- 1 | 2 | # USGS Quadrangles 3 | 4 | Quadrangle map areas from the United States Geological Survey (USGS). These are primarily intended to serve as a non-trivial example of the "box" data type, as map quadrangles are bounded by straight lines in longitude/latitude space. 5 | 6 | These data were [obtained from ESRI](https://www.arcgis.com/home/item.html?id=078eb80010984ddeb4bb5850889e5e9f) and are redistributable without a Value-Added Software Application (such as, adding the sample data to an existing, non-commercial dataset for redistribution) with proper metadata and source/copyright attribution to the United States Geological Survey (USGS). 7 | 8 | 9 | 10 | 11 | ## Files 12 | 13 | - 100k ([fgb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k.fgb), [arrows/box](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k_box.arrows), [arrows](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k.arrows), [arrows/interleaved](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k_interleaved.arrows), [arrows/wkb](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k_wkb.arrows), [geoparquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k_geo.parquet), [geoparquet/native](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k_native.parquet), [parquet](https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/quadrangles/files/quadrangles_100k.parquet)) 14 | -------------------------------------------------------------------------------- /quadrangles/collect.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import geoarrow.pyarrow as ga 4 | import geoarrow.types as gat 5 | import geopandas 6 | import pyarrow as pa 7 | from geoarrow.pyarrow import io 8 | from geoarrow.rust.io import write_flatgeobuf 9 | 10 | here = Path(__file__).parent 11 | 12 | # Obtained from 13 | # https://www.arcgis.com/home/item.html?id=078eb80010984ddeb4bb5850889e5e9f 14 | 15 | 16 | def write_box(lazy=True): 17 | out = here / "files" / "quadrangles_100k_box.arrows" 18 | if lazy and out.exists(): 19 | return 20 | 21 | pd = geopandas.read_file( 22 | here / "cache" / "USGS_100k_Topo_Map_Boundaries/v107/topoq100.gdb" 23 | ) 24 | sheets = pd[["USGS_QD_ID", "geometry"]][~pd["USGS_QD_ID"].isna()] 25 | bounds = sheets.geometry.bounds.round(4) 26 | bounds_array = pa.StructArray.from_arrays( 27 | [pa.array(bounds[col]) for col in bounds], 28 | names=["xmin", "ymin", "xmax", "ymax"], 29 | ) 30 | box_array = gat.box().to_pyarrow().with_crs(gat.OGC_CRS84).wrap_array(bounds_array) 31 | 32 | table = pa.table({"quadrangle_id": sheets["USGS_QD_ID"], "geometry": box_array}) 33 | with pa.ipc.new_stream(out, table.schema) as writer: 34 | writer.write_table(table) 35 | 36 | 37 | def write_everything_else(): 38 | box_file = here / "files" / "quadrangles_100k_box.arrows" 39 | with pa.ipc.open_stream(box_file) as reader: 40 | table = reader.read_all() 41 | 42 | wkb_stream = here / "files" / "quadrangles_100k_wkb.arrows" 43 | stream = here / "files" / "quadrangles_100k.arrows" 44 | interleaved_stream = here / "files" / "quadrangles_100k_interleaved.arrows" 45 | geoparquet = here / "files" / "quadrangles_100k_geo.parquet" 46 | geoparquet_native = here / "files" / "quadrangles_100k_native.parquet" 47 | fgb = here / "files" / "quadrangles_100k.fgb" 48 | 49 | table_wkb = table.set_column(1, "geometry", ga.as_wkb(table["geometry"])) 50 | with pa.ipc.new_stream(wkb_stream, table_wkb.schema) as writer: 51 | writer.write_table(table_wkb) 52 | 53 | # as_geoarrow() can't quite handle the box type yet 54 | table_arrow = table.set_column( 55 | 1, 56 | "geometry", 57 | ga.as_geoarrow(table_wkb["geometry"], coord_type=ga.CoordType.SEPARATED), 58 | ) 59 | with pa.ipc.new_stream(stream, table_arrow.schema) as writer: 60 | writer.write_table(table_arrow) 61 | 62 | table_interleaved = table.set_column( 63 | 1, 64 | "geometry", 65 | ga.as_geoarrow(table_wkb["geometry"], coord_type=ga.CoordType.INTERLEAVED), 66 | ) 67 | with pa.ipc.new_stream(interleaved_stream, table_interleaved.schema) as writer: 68 | writer.write_table(table_interleaved) 69 | 70 | # write_geoparquet_table() can't quite handle the box type 71 | io.write_geoparquet_table(table_wkb, geoparquet) 72 | io.write_geoparquet_table( 73 | table_wkb, 74 | geoparquet_native, 75 | geometry_encoding=io.geoparquet_encoding_geoarrow(), 76 | ) 77 | 78 | with open(fgb, "wb") as f: 79 | write_flatgeobuf(table_interleaved, f, write_index=False) 80 | 81 | 82 | if __name__ == "__main__": 83 | write_box() 84 | write_everything_else() 85 | -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k.arrows -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k.fgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k.fgb -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k.parquet -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k_box.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k_box.arrows -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k_geo.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k_geo.parquet -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k_interleaved.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k_interleaved.arrows -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k_native.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k_native.parquet -------------------------------------------------------------------------------- /quadrangles/files/quadrangles_100k_wkb.arrows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/quadrangles/files/quadrangles_100k_wkb.arrows -------------------------------------------------------------------------------- /quadrangles/manifest.yaml: -------------------------------------------------------------------------------- 1 | group: quadrangles 2 | format: 3 | - fgb 4 | - arrows/box 5 | - arrows 6 | - arrows/interleaved 7 | - arrows/wkb 8 | - geoparquet 9 | - geoparquet/native 10 | - parquet 11 | file_location: repo 12 | files: 13 | - name: 100k 14 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Make sure we get the release candidates for implementations with new features 2 | git+https://github.com/geoarrow/geoarrow-c.git#egg=geoarrow-c&subdirectory=python/geoarrow-c 3 | git+https://github.com/geoarrow/geoarrow-python.git#egg=geoarrow-types&subdirectory=geoarrow-types 4 | git+https://github.com/geoarrow/geoarrow-python.git#egg=geoarrow-pyarrow&subdirectory=geoarrow-pyarrow 5 | geoarrow-rust-core >= 0.4.0b3 6 | geoarrow-rust-io >= 0.4.0b3 7 | geoarrow-rust-compute >= 0.4.0b3 8 | pyogrio 9 | pyarrow 10 | pyyaml 11 | geopandas 12 | pandas 13 | duckdb 14 | pytest 15 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geoarrow/geoarrow-data/e8eaa04487d982398f07713cde527c5c5edeee1e/tests/__init__.py -------------------------------------------------------------------------------- /tests/model.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | from pathlib import Path 4 | 5 | import yaml 6 | 7 | _here = Path(__file__).parent 8 | 9 | GROUPS = ( 10 | "example", 11 | "example-crs", 12 | "microsoft-buildings", 13 | "natural-earth", 14 | "quadrangles", 15 | "ns-water", 16 | ) 17 | 18 | 19 | class File: 20 | def __init__(self, path, file_location="release"): 21 | self.path = path 22 | self.group, self.name, self.suffix = parse_path(path) 23 | self.format = FORMATS[self.suffix] 24 | self.file_location = file_location 25 | 26 | def url(self, ref): 27 | if self.file_location == "repo": 28 | path = f"{ref}/{self.group}/files/{self.path.name}" 29 | return f"https://raw.githubusercontent.com/geoarrow/geoarrow-data/{path}" 30 | elif self.file_location == "release": 31 | path = f"releases/download/{ref}/{self.path.name}" 32 | return f"https://github.com/geoarrow/geoarrow-data/{path}" 33 | else: 34 | raise ValueError(f"Unknown file location: '{self.file_location}'") 35 | 36 | def to_dict(self, ref): 37 | return {"name": self.name, "format": self.format, "url": self.url(ref)} 38 | 39 | def __repr__(self): 40 | return f"File({self.path.name})" 41 | 42 | 43 | class Manifest: 44 | def __init__(self, path): 45 | self.path = path 46 | with open(path) as f: 47 | self._obj = yaml.safe_load(f) 48 | self.group = self._obj["group"] 49 | self.file_location = ( 50 | "release" 51 | if "file_location" not in self._obj 52 | else self._obj["file_location"] 53 | ) 54 | self._formats = self._obj["format"] if "format" in self._obj else [] 55 | 56 | def list_file_info(self): 57 | for file in self._obj["files"]: 58 | name = file["name"] 59 | skip_formats = file["skip_format"] if "skip_format" in file else [] 60 | formats = file["format"] if "format" in file else self._formats 61 | for format in formats: 62 | if format in skip_formats: 63 | continue 64 | if format not in SUFFIXES: 65 | raise ValueError( 66 | f"Unexpected format: '{format}' in manifest '{self.path}'" 67 | ) 68 | yield name, format 69 | 70 | def list_files(self): 71 | for name, format in self.list_file_info(): 72 | yield File(path(self.group, name, format), self.file_location) 73 | 74 | 75 | def path(group, name, format): 76 | return _here.parent / group / "files" / f"{group}_{name}{SUFFIXES[format]}" 77 | 78 | 79 | def parse_filename(filename): 80 | maybe_match = re.match(r"^([a-z-]+)_([^_.]+)(.*)$", filename) 81 | if maybe_match is None: 82 | raise ValueError(f"'{filename}' is not a valid asset filename") 83 | 84 | group, name, suffix = maybe_match.groups() 85 | if suffix not in FORMATS: 86 | raise ValueError(f"'{filename}' does not contain a valid suffix") 87 | 88 | return group, name, suffix 89 | 90 | 91 | def parse_path(path): 92 | group, name, suffix = parse_filename(path.name) 93 | 94 | if path.parent.name != "files": 95 | raise ValueError( 96 | f"Expected path parent to be 'files' but got '{path.parent.name}'" 97 | ) 98 | 99 | if path.parent.parent.name != group: 100 | raise ValueError( 101 | f"Expected path parent's parent to be '{group}' but got" 102 | f" {path.parent.parent.name}" 103 | ) 104 | 105 | return group, name, suffix 106 | 107 | 108 | def list_paths(groups=GROUPS): 109 | out = [] 110 | for group in groups: 111 | files_dir = _here.parent / group / "files" 112 | out.extend( 113 | files_dir / file 114 | for file in os.listdir(files_dir) 115 | if not file.startswith(".") 116 | ) 117 | return out 118 | 119 | 120 | def list_files(groups=GROUPS): 121 | return [File(path) for path in list_paths(groups)] 122 | 123 | 124 | def list_manifests(groups=GROUPS): 125 | return [Manifest(_here.parent / group / "manifest.yaml") for group in groups] 126 | 127 | 128 | def list_items(groups=GROUPS): 129 | items = {} 130 | for file in list_files(groups): 131 | key = f"{file.group}_{file.name}" 132 | if key not in items: 133 | items[key] = {} 134 | 135 | items[key][file.format] = file 136 | 137 | return items 138 | 139 | 140 | SUFFIXES = { 141 | "tsv": ".tsv", 142 | "fgb/zip": ".fgb.zip", 143 | "fgb": ".fgb", 144 | "arrows": ".arrows", 145 | "arrows/interleaved": "_interleaved.arrows", 146 | "arrows/box": "_box.arrows", 147 | "arrows/wkb": "_wkb.arrows", 148 | "arrows/wkt": "_wkt.arrows", 149 | "parquet": ".parquet", 150 | "geoparquet": "_geo.parquet", 151 | "geoparquet/native": "_native.parquet", 152 | } 153 | 154 | FORMATS = {v: k for k, v in SUFFIXES.items()} 155 | -------------------------------------------------------------------------------- /tests/test_geopandas.py: -------------------------------------------------------------------------------- 1 | import geopandas 2 | import pyarrow as pa 3 | import pytest 4 | 5 | from . import model 6 | 7 | # Skip buildings because it takes too long to load, skip built-in parquet 8 | # because geopandas doesn't support it 9 | GEOPANDAS_PARQUET_FILES = [ 10 | f 11 | for f in model.list_files() 12 | if "geoparquet" in f.format and "buildings" not in f.group and not f.name.endswith("m") 13 | ] 14 | 15 | # Skip buildings because it takes too long to load, skip wkt and box because 16 | # geopandas doesn't support it, skip anything with m values because it's 17 | # not supported by geopandas yet 18 | GEOPANDAS_ARROW_FILES = [ 19 | f 20 | for f in model.list_files() 21 | if "arrows" in f.format 22 | and "buildings" not in f.group 23 | and not f.name.endswith("m") 24 | and f.format not in ("arrows/wkt", "arrows/box") 25 | ] 26 | 27 | # We limit to a million rows on read, so we can handle all .fgb files 28 | GEOPANDAS_FGB_FILES = [f for f in model.list_files() if "fgb" in f.format] 29 | 30 | 31 | @pytest.mark.parametrize( 32 | "file", 33 | GEOPANDAS_PARQUET_FILES, 34 | ids=[f.path.name for f in GEOPANDAS_PARQUET_FILES], 35 | ) 36 | def test_geoparquet(file: model.File): 37 | df = geopandas.read_parquet(file.path) 38 | assert isinstance(df, geopandas.GeoDataFrame) 39 | assert isinstance(df.geometry, geopandas.GeoSeries) 40 | 41 | 42 | @pytest.mark.parametrize( 43 | "file", 44 | GEOPANDAS_ARROW_FILES, 45 | ids=[f.path.name for f in GEOPANDAS_ARROW_FILES], 46 | ) 47 | def test_from_arrow(file: model.File): 48 | if file.format == "arrows/wkt": 49 | pytest.skip("geopandas doesn't support geoarrow.wkt") 50 | 51 | with pa.ipc.open_stream(file.path) as reader: 52 | tab = reader.read_all() 53 | df = geopandas.GeoDataFrame.from_arrow(tab) 54 | assert isinstance(df, geopandas.GeoDataFrame) 55 | assert isinstance(df.geometry, geopandas.GeoSeries) 56 | 57 | 58 | @pytest.mark.parametrize( 59 | "file", 60 | GEOPANDAS_FGB_FILES, 61 | ids=[f.path.name for f in GEOPANDAS_FGB_FILES], 62 | ) 63 | def test_fgb(file: model.File): 64 | # Check with and without use_arrow 65 | df = geopandas.read_file( 66 | file.path, rows=1_000_000, engine="pyogrio", use_arrow=False 67 | ) 68 | assert isinstance(df, geopandas.GeoDataFrame) 69 | assert isinstance(df.geometry, geopandas.GeoSeries) 70 | 71 | df = geopandas.read_file( 72 | file.path, rows=1_000_000, engine="pyogrio", use_arrow=True 73 | ) 74 | assert isinstance(df, geopandas.GeoDataFrame) 75 | assert isinstance(df.geometry, geopandas.GeoSeries) 76 | -------------------------------------------------------------------------------- /tests/test_manifests.py: -------------------------------------------------------------------------------- 1 | from . import model 2 | 3 | 4 | def test_files_exist(): 5 | # Parses the names/paths of all the files 6 | all_files = model.list_files() 7 | 8 | # Ensure all declared files exist 9 | all_manifests = model.list_manifests() 10 | files_chk = {f.path.name for f in all_files} 11 | for manifest in all_manifests: 12 | for file in manifest.list_files(): 13 | assert file.path.exists() 14 | files_chk.remove(file.path.name) 15 | 16 | # Check that everything was in a manifest somewhere 17 | assert len(files_chk) == 0 18 | -------------------------------------------------------------------------------- /tests/test_parquet.py: -------------------------------------------------------------------------------- 1 | import json 2 | import warnings 3 | 4 | import geopandas 5 | import geoarrow.pyarrow as ga 6 | import numpy as np 7 | import pyarrow as pa 8 | from pyarrow import parquet 9 | import pytest 10 | 11 | from . import model 12 | 13 | 14 | def check_parquet_schema(arrow_wkb_schema, parquet_schema): 15 | field_index = arrow_wkb_schema.get_field_index("geometry") 16 | field = arrow_wkb_schema.field(field_index) 17 | col = parquet_schema.column(field_index) 18 | col_dict = json.loads(col.logical_type.to_json()) 19 | if field.type.edge_type == ga.EdgeType.PLANAR: 20 | assert col_dict["Type"] == "Geometry" 21 | else: 22 | assert col_dict["Type"] == "Geography" 23 | 24 | if field.type.crs is None: 25 | assert "crs" not in col_dict 26 | 27 | return col_dict["Type"] 28 | 29 | 30 | def check_xy_stats_geopandas(batch, parquet_stats): 31 | try: 32 | # This doesn't handle nulls but is much faster 33 | geoseries = ga.to_geopandas(batch["geometry"]) 34 | except TypeError: 35 | # Handles nulls but is much slower 36 | geoseries = geopandas.GeoSeries.from_wkb(batch["geometry"].to_pylist()) 37 | 38 | xmin, ymin, xmax, ymax = geoseries.total_bounds 39 | assert ( 40 | parquet_stats["xmin"], 41 | parquet_stats["ymin"], 42 | parquet_stats["xmax"], 43 | parquet_stats["ymax"], 44 | ) == (xmin, ymin, xmax, ymax) 45 | 46 | # There's no good way to get Z or M bounds from geopandas but we can 47 | # get all the coordinates and compute them ourselves. (M values aren't 48 | # supported by geopandas yet) 49 | xyz_coords = geoseries.get_coordinates(include_z=True).to_numpy() 50 | with warnings.catch_warnings(): 51 | warnings.simplefilter("ignore") 52 | coord_mins = [None if np.isnan(x) else x for x in np.nanmin(xyz_coords, 0)] 53 | coord_maxes = [None if np.isnan(x) else x for x in np.nanmax(xyz_coords, 0)] 54 | 55 | assert xyz_coords.shape[1] == 3 56 | xmin, ymin, zmin = coord_mins 57 | xmax, ymax, zmax = coord_maxes 58 | assert ( 59 | parquet_stats["xmin"], 60 | parquet_stats["ymin"], 61 | parquet_stats["zmin"], 62 | parquet_stats["xmax"], 63 | parquet_stats["ymax"], 64 | parquet_stats["zmax"], 65 | ) == (xmin, ymin, zmin, xmax, ymax, zmax) 66 | 67 | 68 | def check_xy_stats_geoarrow_box(batch, parquet_stats): 69 | box = ga.box_agg(batch["geometry"]).as_py() 70 | assert ( 71 | parquet_stats["xmin"], 72 | parquet_stats["ymin"], 73 | parquet_stats["xmax"], 74 | parquet_stats["ymax"], 75 | ) == ( 76 | box["xmin"], 77 | box["ymin"], 78 | box["xmax"], 79 | box["ymax"], 80 | ) 81 | 82 | 83 | def check_geometry_types_geoarrow(batch, parquet_stats): 84 | types = ga.unique_geometry_types(batch["geometry"]).to_pylist() 85 | type_codes = [t["geometry_type"] + ((t["dimensions"] - 1) * 1000) for t in types] 86 | assert parquet_stats["geospatial_types"] == type_codes 87 | 88 | 89 | @pytest.mark.parametrize( 90 | "name_and_item", model.list_items().items(), ids=list(model.list_items().keys()) 91 | ) 92 | def test_batch_statistics(name_and_item): 93 | item: model.File = name_and_item[1] 94 | 95 | try: 96 | parquet_file = parquet.ParquetFile( 97 | item["parquet"].path, arrow_extensions_enabled=True 98 | ) 99 | except TypeError: 100 | pytest.skip("forthcoming pyarrow required for test") 101 | 102 | wkb_path = item["arrows/wkb"].path 103 | with pa.ipc.open_stream(wkb_path) as reader: 104 | parquet_type = check_parquet_schema(reader.schema, parquet_file.schema) 105 | 106 | if parquet_type == "Geography": 107 | return 108 | 109 | parquet_stats = [] 110 | geometry_column_index = parquet_file.schema_arrow.get_field_index("geometry") 111 | for i in range(parquet_file.num_row_groups): 112 | col = parquet_file.metadata.row_group(i).column(geometry_column_index) 113 | parquet_stats.append(col.geo_statistics.to_dict()) 114 | 115 | with pa.ipc.open_stream(wkb_path) as reader: 116 | for i, batch in enumerate(reader): 117 | check_xy_stats_geopandas(batch, parquet_stats[i]) 118 | check_xy_stats_geoarrow_box(batch, parquet_stats[i]) 119 | check_geometry_types_geoarrow(batch, parquet_stats[i]) 120 | -------------------------------------------------------------------------------- /tests/test_structure.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import re 4 | import zipfile 5 | 6 | import pyarrow as pa 7 | import pytest 8 | from pyarrow import ipc, parquet 9 | 10 | from . import model 11 | 12 | # Roughly, these are all the checks we can do on the files without actually invoking 13 | # any spatial interpretation (e.g., file type, metadata, data types) 14 | 15 | 16 | @pytest.mark.parametrize( 17 | "file", model.list_files(), ids=[f.path.name for f in model.list_files()] 18 | ) 19 | def test_structure(file: model.File): 20 | assert file.path.exists() 21 | # We need all of these to be less than 2 GB 22 | assert os.stat(file.path).st_size <= (2**31 - 1) 23 | 24 | if file.format == "arrows/wkb": 25 | table = read_format_arrows(file) 26 | check_wkb(file, table) 27 | elif file.format == "arrows/wkt": 28 | table = read_format_arrows(file) 29 | check_wkt(file, table) 30 | elif file.format in ("arrows", "arrows/interleaved"): 31 | table = read_format_arrows(file) 32 | check_arrows(file, table) 33 | elif file.format == "arrows/box": 34 | table = read_format_arrows(file) 35 | check_box(file, table) 36 | elif file.format == "tsv": 37 | read_format_tsv(file) 38 | elif file.format == "geoparquet": 39 | table = read_format_geoparquet(file) 40 | check_wkb(file, table) 41 | elif file.format == "geoparquet/native": 42 | table = read_format_geoparquet(file) 43 | check_arrows(file, table) 44 | elif file.format == "fgb/zip": 45 | read_format_fgb_zip(file) 46 | elif file.format == "fgb": 47 | read_format_fgb(file) 48 | elif file.format == "parquet": 49 | read_format_parquet(file) 50 | else: 51 | pytest.skip(f"Unimplemented format: {file.format}") 52 | 53 | 54 | def read_format_arrows(file: model.File): 55 | with ipc.open_stream(file.path) as reader: 56 | table = reader.read_all() 57 | check_field_names(table.column_names) 58 | 59 | field = table.schema.field("geometry") 60 | assert field.metadata[b"ARROW:extension:name"].startswith(b"geoarrow.") 61 | assert isinstance(json.loads(field.metadata[b"ARROW:extension:metadata"]), dict) 62 | 63 | table.validate(full=True) 64 | return table 65 | 66 | 67 | def read_format_parquet(file: model.File): 68 | with parquet.ParquetFile(file.path) as f: 69 | schema = f.schema_arrow 70 | check_field_names(schema.names) 71 | col = f.schema.column(len(schema.names) - 1) 72 | col_dict = json.loads(col.logical_type.to_json()) 73 | assert col_dict["Type"] in ("Geometry", "Geography") 74 | 75 | 76 | def read_format_geoparquet(file: model.File): 77 | table = parquet.read_table(file.path) 78 | check_field_names(table.column_names) 79 | 80 | assert b"geo" in table.schema.metadata 81 | 82 | geo = json.loads(table.schema.metadata[b"geo"]) 83 | assert geo["primary_column"] == "geometry" 84 | assert list(geo["columns"].keys()) == ["geometry"] 85 | 86 | col = geo["columns"]["geometry"] 87 | assert "encoding" in col 88 | assert "geometry_types" in col 89 | if "crs" in col: 90 | assert col["crs"] is None or isinstance(col, dict) 91 | 92 | return table 93 | 94 | 95 | def read_format_tsv(file: model.File): 96 | with open(file.path) as f: 97 | assert f.readline() == "geometry\n" 98 | count = 0 99 | for line in f: 100 | if line.strip(): 101 | assert re.match(r"^[A-Z]+", line) is not None 102 | count += 1 103 | assert count > 0 104 | 105 | 106 | def check_wkb(file: model.File, table: pa.Table): 107 | assert table["geometry"].type == pa.binary() 108 | 109 | 110 | def check_wkt(file: model.File, table: pa.Table): 111 | assert table["geometry"].type == pa.utf8() 112 | 113 | 114 | def check_box(file: model.File, table: pa.Table): 115 | assert table["geometry"].type == pa.struct( 116 | [ 117 | pa.field("xmin", pa.float64(), False), 118 | pa.field("ymin", pa.float64(), False), 119 | pa.field("xmax", pa.float64(), False), 120 | pa.field("ymax", pa.float64(), False), 121 | ] 122 | ) 123 | 124 | 125 | def check_arrows(file: model.File, table: pa.Table): 126 | _check_native_type(table["geometry"].type, file.format) 127 | 128 | 129 | def _check_native_type(type: pa.DataType, format: str): 130 | if pa.types.is_list(type): 131 | return _check_native_type(type.value_type, format) 132 | elif pa.types.is_union(type): 133 | # We could validate field names and type ids when implemented 134 | return 135 | 136 | if format == "arrows/interleaved": 137 | assert pa.types.is_fixed_size_list(type) 138 | assert type.value_field.name in ("xy", "xyz", "xym", "xyzm") 139 | assert pa.types.is_float64(type.value_type) 140 | elif format in ("arrows", "geoparquet/native"): 141 | assert pa.types.is_struct(type) 142 | assert "".join(type.names) in ("xy", "xyz", "xym", "xyzm") 143 | for field in type.fields: 144 | assert pa.types.is_float64(field.type) 145 | else: 146 | raise ValueError(f"Unexpected format: {format}") 147 | 148 | 149 | def read_format_fgb_zip(file: model.File): 150 | with zipfile.ZipFile(file.path) as fzip: 151 | assert fzip.namelist() == [file.path.name.replace(".zip", "")] 152 | magic = b"\x66\x67\x62\x03\x66\x67\x62" 153 | with fzip.open(fzip.namelist()[0]) as f: 154 | assert f.read(len(magic)) == magic 155 | 156 | 157 | def read_format_fgb(file: model.File): 158 | magic = b"\x66\x67\x62\x03\x66\x67\x62" 159 | with open(file.path, "rb") as f: 160 | assert f.read(len(magic)) == magic 161 | 162 | 163 | def check_field_names(field_names): 164 | all_names = list(field_names) 165 | 166 | assert "geometry" in field_names 167 | assert "geometry" == field_names[-1] 168 | 169 | unique_names = set(all_names) 170 | if len(all_names) != len(unique_names): 171 | lab = ", ".join("{v}" for v in all_names) 172 | raise ValueError(f"Non-unique names: {lab}") 173 | -------------------------------------------------------------------------------- /upload-assets.py: -------------------------------------------------------------------------------- 1 | import json 2 | import subprocess 3 | import sys 4 | import urllib.request 5 | from pathlib import Path 6 | 7 | from tests import model 8 | 9 | 10 | def upload_assets(): 11 | here = Path(__file__).parent 12 | 13 | for manifest in model.list_manifests(): 14 | for file in manifest.list_files(): 15 | if file.file_location != "release": 16 | continue 17 | 18 | path = file.path.relative_to(here) 19 | cmd = ["gh", "release", "upload", ref, path] 20 | print(cmd) 21 | subprocess.run(cmd) 22 | 23 | 24 | def check_urls(): 25 | manifest = Path(__file__).parent / "manifest.json" 26 | 27 | with open(manifest) as f: 28 | obj = json.load(f) 29 | 30 | for group in obj["groups"]: 31 | for file in group["files"]: 32 | url = file["url"] 33 | print(f"Checking '{url}'") 34 | with urllib.request.urlopen(url) as f: 35 | assert f.getcode() < 400 36 | f.close() 37 | 38 | 39 | if __name__ == "__main__": 40 | args = sys.argv[1:] 41 | if not args: 42 | raise ValueError("Must pass tag as first arg") 43 | 44 | ref = args[0] 45 | upload_assets() 46 | check_urls() 47 | --------------------------------------------------------------------------------