pg_eviltransform
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_eviltransform | 0.0.4 | GIS | MIT | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1580 | pg_eviltransform | No | Yes | No | Yes | No | Yes | eviltransform_internal |
| Related | postgis postgis h3 pg_geohash pg_polyline earthdistance qdgc convert pgrouting nominatim_fdw q3c |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.0.4 | 1817161514 | pg_eviltransform | postgis |
| RPM | PIGSTY | 0.0.4 | 1817161514 | pg_eviltransform_$v | postgis36_$v |
| DEB | PIGSTY | 0.0.4 | 1817161514 | postgresql-$v-eviltransform | postgresql-$v-postgis |
Build
You can build the RPM / DEB packages for pg_eviltransform using pig build:
Install
You can install pg_eviltransform directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
pg_eviltransform extends PostGIS with coordinate transformations involving China’s GCJ-02 and BD-09 systems. Version 0.0.4 also adds exact Jenks natural-break classification through ST_JenksBins array and aggregate overloads.
Coordinate Transformation
Custom SRIDs are 990001 for GCJ-02 and 990002 for BD-09. When neither endpoint uses a custom system, ST_EvilTransform delegates to PostGIS ST_Transform; otherwise it converts through WGS84 (4326) when necessary.
Jenks Natural Breaks
Array inputs support numeric, double precision, real, bigint, integer, and smallint. Aggregate inputs are numeric or double precision; cast other numeric columns when needed.
API Index and Caveats
ST_EvilTransform(geometry, integer|text)andST_EvilTransform(geometry, text, integer|text): four overloads corresponding to the PostGISST_Transforminterface.ST_JenksBins(values[], breaks [, invert]): classifies an array and returnsdouble precision[]edges.ST_JenksBins(value, breaks [, invert]): streaming aggregate that avoids materializingarray_agg.- PostGIS is a runtime prerequisite and must be installed before
pg_eviltransform. - Jenks inputs must be finite and
breaksmust be at least one.numericvalues are converted to finitef64, so returned edges are floating-point values. - When the distinct value count does not exceed
breaks, the result is the sorted set of unique values; no valid input rows returnNULL.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)