• Stars
    star
    156
  • Rank 239,547 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 6 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Utility for working with GeoParquet

gpq

A utility for working with GeoParquet.

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 Homebrew users, you can install gpq from the Planet tap:

# run `brew update` first if you have used this tap previously and want the latest formula
brew install planetlabs/tap/gpq

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://planetlabs.github.io/gpq/.

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 generates a validation report for a GeoParquet file.

gpq validate example.parquet

By default, the command writes out a text report with a list of status checks. The command exits with status code 1 if one or more of the checks does not pass.

The validation includes scanning the data to ensure that values in geometry columns conform with the specification (making assertions about the encoding, ring orientation, bounding box, and alignment with other metadata). For very large GeoParquet files, the rules that scan the geometry data can be skipped with the --metadata-only argument. With this argument, the command only runs rules related to the file metadata and Parquet schema.

To generate a JSON report instead of the text report, use the --format json argument.

See gpq validate --help for the full list of options.

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

The convert command can also be used to convert an input Parquet file without "geo" metadata to a valid GeoParquet file.

# read parquet and write geoparquet
gpq convert non-geo.parquet valid-geo.parquet

When reading from a Parquet file and writing out GeoParquet, the input geometry values can be WKB or WKT encoded. The output geometry values will always be WKB encoded.

The --input-primary-column argument can be used to provide a primary geometry column name when reading Parquet files without "geo" metadata (defaults to geometry).

The --compression argument can be used to control the compression codec used when writing GeoParquet. See gpq convert --help for the available options.

describe

The describe command prints schema information and metadata about a GeoParquet file.

gpq describe example.parquet

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.
  • Feature identifiers in GeoJSON are not written to GeoParquet columns. This may change soon.

More Repositories

1

draino

Automatically cordon and drain Kubernetes nodes based on node conditions
Go
629
star
2

notebooks

interactive notebooks from Planet Engineering
Jupyter Notebook
623
star
3

planet-client-python

Python client for Planet APIs
Python
274
star
4

plcompositor

seamless and cloudless image mosaics from deep stacks of satellite imagery
C++
101
star
5

kubehook

A JWT based Kubernetes webhook authentication service.
Go
83
star
6

planet-amazon-deforestation

Jupyter Notebook
68
star
7

viewpoints

Viewpoints is a tool for visualizing high dimensionality data using linked scatter plots.
JavaScript
63
star
8

maxrect

Find the maximally inscribed, axis-aligned rectangle for a given polygon
Python
50
star
9

staccato

Java implementation of the STAC spec
Java
49
star
10

maps

Declarative mapping components for React
JavaScript
49
star
11

stratus

Java
46
star
12

qgis-planet-plugin

Browse, filter, preview and download Planet Inc imagery in QGIS.
Python
46
star
13

radiometric_normalization

Implementation of radiometric normalization workflows
Python
33
star
14

color_balance

Balance your colors!
Python
31
star
15

fio-planet

Python
26
star
16

numpytiles-spec

24
star
17

client

JavaScript client for the Planet imagery API
JavaScript
24
star
18

planet-view

Extension for Google Chrome displaying Planet Labs imagery
JavaScript
17
star
19

go-stac

Utilities for working with STAC resources
Go
17
star
20

datalake

a metadata-aware file archive
JavaScript
17
star
21

training-workshop

Jupyter Notebook
12
star
22

go-ogc

Utilities for working with OGC APIs
Go
12
star
23

ol-maps

Custom builds of OpenLayers 3
Makefile
11
star
24

ol-numpytiles

JavaScript
11
star
25

cloudshadow

Attempt to detect cloud shadows
Python
9
star
26

stac-extension

STAC extension for Planet data
JavaScript
9
star
27

planet-tmask

Python
8
star
28

legion

Legion serves a Kubernetes mutating admission webhook that mutates pods. Pods are mutated according to a PodMutation, which configures how pod fields are set, altered, or appended during mutation.
Go
8
star
29

datalake-ingester

Python
7
star
30

dta

DekTek driver for Ubuntu
C
7
star
31

hal5d

An haproxy shim for linkerd Kubernetes ingress
Go
7
star
32

planet_stack_finder

Find locations of overlapping geometries
Python
6
star
33

eslint-config-planet

ESLint config for Planet projects
JavaScript
6
star
34

klondike

Python
6
star
35

kostanza

Go
6
star
36

planet-order-ps

Open a downloaded Planet order in Photoshop
JavaScript
5
star
37

crtime

simple utility for determining the creation time of a file on Linux
Shell
5
star
38

flake8-continuation

Python
4
star
39

spectastic

Request and response validation against swagger schemas.
Python
4
star
40

colorCorrection

A small demo of client-side color correction of an image
JavaScript
4
star
41

cosmolog

Python
4
star
42

es_fluent

A fluent API for ES query construction.
Python
3
star
43

homebrew-tap

Planet Labs Homebrew Formulae
Ruby
3
star
44

feature_finder

Find scenes that overlap OSM features by feature category (e.g. airports)
Python
3
star
45

pyqspline

C
3
star
46

planetcoveragefinder

Tool to find cloud-free coverages of an area using PlanetScope scenes
Python
3
star
47

DrySpy

Jupyter Notebook
2
star
48

datalake-api

JavaScript
2
star
49

web-dev

Tips, tech, and tactics for Planet web developers
2
star
50

linkin

linkerd flavoured Zipkin trace propagation for Opencensus
Go
2
star
51

pl-cartodb-source

C++
1
star
52

chrome-wikipedia-linkerizer

Add a scenes link to wikipedia lat/long links.
JavaScript
1
star
53

datalake-common

Python
1
star
54

open-stac

Open STAC Resources
Makefile
1
star
55

planet-css

CSS reset and some basic styles that comply with Planet design
CSS
1
star
56

orders-workshop

1
star