gpq

module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT

README

gpq

A utility for working with GeoParquet.

Command Line Utility

The gpq program can be used to validate GeoParquet files and to convert to and from GeoJSON.

# see the available commands
gpq --help
validate

The validate command validates the "geo" file metadata against the schema.

gpq validate example.parquet

In the future, this command might also read geometries to confirm that they are valid and that any provided bbox is correct. But for now, just the "geo" metadata is validated against the schema.

convert

The convert command can convert a GeoJSON file to GeoParquet or a GeoParquet file to GeoJSON.

# read geojson and write geoparquet
gpq convert example.geojson example.parquet
# read geoparquet and write geojson
gpq convert example.parquet example.geojson

Installation

The gpq program can be installed by downloading one of the archives from the latest release.

Extract the archive and place the gpq executable somewhere on your path. See a list of available commands by running gpq in your terminal.

For Mac users, if you get a message that the program can't be opened because Apple cannot check it for malicious software, you can allow access in your system preferences. Under the Apple menu > System Preferences, click Security & Privacy, then click General. There you should see an Allow Anyway button.

WebAssembly

In addition to the CLI program, the gpq utility is built as a WebAssembly binary. The WASM build can be downloaded from the latest release.

To give it a try without downloading or installing anything, see https://tschaub.net/gpq/.

Limitations

  • Non-geographic CRS information is not preserved when converting GeoParquet to GeoJSON.
  • Page and row group size is not configurable when writing GeoParquet. This may change soon.
  • GeoParquet files are written using ZSTD compression. This is not configurable but may change soon.
  • When reading GeoJSON, the schema is inferred from the first feature that has all non-null properties. All other features must conform with this schema.
  • Reading GeoParquet files with multiple geometry columns is supported. Reading GeoJSON files with multiple geometry properties is not supported.
  • Feature identifiers in GeoJSON are not written to GeoParquet columns. This may change soon.

Please open an issue if you run into any problems.

Directories

Path Synopsis
cmd
gpq
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL