|
1 | 1 | # GeoParquet |
2 | 2 |
|
| 3 | + |
| 4 | + |
3 | 5 | [](https://www.npmjs.com/package/hyparquet) |
4 | 6 | [](https://www.npmjs.com/package/hyparquet) |
| 7 | +[](https://github.com/hyparam/geoparquet/actions) |
5 | 8 | [](https://opensource.org/licenses/MIT) |
| 9 | + |
| 10 | + |
| 11 | +**GeoParquet** provides a pure JavaScript workflow to read and convert [GeoParquet](https://github.com/opengeospatial/geoparquet) files into [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946). Under the hood, it uses the [hyparquet](https://github.com/hyparam/hyparquet) library for efficient in-browser parquet parsing, enabling minimal overhead and fast loading. |
| 12 | + |
| 13 | +## Why GeoParquet? |
| 14 | + |
| 15 | +**GeoParquet** is an emerging standard for storing geospatial vector data in the columnar [Parquet](https://parquet.apache.org/) format. By leveraging Parquet’s columnar storage, GeoParquet files can be significantly more compact and faster to query than their GeoJSON equivalents, especially for large datasets. This can result in: |
| 16 | + |
| 17 | +- **Smaller file sizes:** A GeoParquet file plus this lightweight library can often be much smaller than the equivalent GeoJSON, reducing bandwidth costs and improving load times. |
| 18 | +- **Faster loading:** Pure JavaScript parsing of Parquet files in the browser, with tiny package size means fast page load times. |
| 19 | +- **Seamless integration:** GeoParquet is based on well-established standards (GeoJSON, Parquet), ensuring broad compatibility and extensibility. |
| 20 | + |
| 21 | +## Usage |
| 22 | + |
| 23 | +Convert a GeoParquet file to GeoJSON: |
| 24 | + |
| 25 | +```javascript |
| 26 | +const { asyncBufferFromUrl, toGeoJson } = import('geoparquet') |
| 27 | + |
| 28 | +const file = asyncBufferFromUrl('example.parquet') |
| 29 | +const geoJson = toGeoJson({ file }) |
| 30 | +``` |
6 | 31 |
|
7 | | -Convert geoparquet to geojson. |
| 32 | +## Demo |
8 | 33 |
|
9 | | -Uses [hyparquet](https://github.com/hyparam/hyparquet) for tiny and fast parsing of parquet files in js. |
| 34 | +Check out the [live demo](https://hyparam.github.io/geoparquet/) to see GeoParquet in action. |
10 | 35 |
|
11 | 36 | ## References |
12 | 37 |
|
13 | | - - GeoJSON: https://datatracker.ietf.org/doc/html/rfc7946 |
| 38 | + - https://geoparquet.org/ |
14 | 39 | - https://github.com/opengeospatial/geoparquet |
| 40 | + - https://geojson.org/ |
| 41 | + - https://datatracker.ietf.org/doc/html/rfc7946 |
| 42 | + - https://github.com/hyparam/hyparquet |
0 commit comments