pg_polyline
pg_polyline
pg_polyline : Fast Google Encoded Polyline encoding & decoding for postgres
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1570 | pg_polyline
|
pg_polyline
|
0.0.1 |
GIS
|
MIT
|
Rust
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d--
|
No
|
Yes
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| See Also | postgis
pgrouting
pg_geohash
postgis_topology
postgis_raster
postgis_sfcgal
postgis_tiger_geocoder
address_standardizer
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.0.1 |
18
17
16
15
14
|
pg_polyline |
- |
| RPM | PIGSTY
|
0.0.1 |
18
17
16
15
14
|
pg_polyline_$v |
- |
| DEB | PIGSTY
|
0.0.1 |
18
17
16
15
14
|
postgresql-$v-pg-polyline |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
el8.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
el9.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
el9.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
el10.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
el10.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
d12.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
d12.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
d13.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
d13.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
u22.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
u22.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
u24.x86_64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
u24.aarch64
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
PIGSTY 0.0.1
|
Source
pig build pkg pg_polyline; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_polyline; # install via package name, for the active PG version
pig install pg_polyline -v 18; # install for PG 18
pig install pg_polyline -v 17; # install for PG 17
pig install pg_polyline -v 16; # install for PG 16
pig install pg_polyline -v 15; # install for PG 15
pig install pg_polyline -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pg_polyline;Usage
pg_polyline: Google Encoded Polyline encoding & decoding for PostgreSQL
Fast Google Encoded Polyline encoding & decoding as a PostgreSQL extension. Built with pgrx.
CREATE EXTENSION pg_polyline;
-- Encode an array of points to a polyline string
SELECT polyline_encode(
ARRAY[point(-120.2, 38.5), point(-120.95, 40.7), point(-126.453, 43.252)], 6
);
-- polyline_encode
-- ----------------------------------
-- _izlhA~rlgdF_{geC~ywl@_kwzCn`{nI
-- Decode a polyline string back to points
SELECT polyline_decode('_ibE_seK_seK_seK', 6);
-- polyline_decode
-- ---------------------------
-- {"(0.2,0.1)","(0.4,0.3)"}The second parameter is the precision (number of decimal places).
Last updated on