postgis-knowledge-patch

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PostGIS 3.5+ Knowledge Patch

PostGIS 3.5+ 知识补丁

Claude's baseline knowledge covers PostGIS through 3.4. This skill provides features from 3.5 (Sep 2024) onwards.
Source: PostGIS news at https://postgis.net/news/
Claude的基础知识涵盖PostGIS 3.4及以前版本。本技能提供3.5版本(2024年9月)及之后的功能内容。
来源:PostGIS新闻网站 https://postgis.net/news/

Additional Resources

额外资源

Reference Files

参考文件

For detailed descriptions, code examples, and full context on each change, consult:
  • references/postgis-3.5-3.6-details.md
    — Detailed changelog organized by topic (breaking changes, new vector/raster/topology/SFCGAL functions)
如需了解每项变更的详细说明、代码示例和完整上下文,请查阅:
  • references/postgis-3.5-3.6-details.md
    — 按主题分类的详细更新日志(包含破坏性变更、新的矢量/栅格/拓扑/SFCGAL函数)

3.5.0 (2024-09-25)

3.5.0(2024-09-25)

Requires: PostgreSQL 12-17, GEOS 3.8+, Proj 6.1+. SFCGAL 1.5 for all SFCGAL features.
系统要求:PostgreSQL 12-17、GEOS 3.8及以上、Proj 6.1及以上。使用所有SFCGAL功能需要SFCGAL 1.5。

Breaking Changes

破坏性变更

ChangeImpact
SFCGAL
ST_*
CG_*
prefix
All SFCGAL functions renamed. Old
ST_
names deprecated.
ST_DFullyWithin
semantics
Now
ST_Contains(ST_Buffer(A, R), B)
. May return different results.
ST_AsGeoJSON(record)
signature
Can promote column as Feature
id
. Materialized views need rebuild.
ST_GeneratePoints
seed
Seeded random points produce different results. Regenerate if needed.
ST_Clip
variants replaced
New
touched
param added. Materialized views need rebuild.
变更内容影响
SFCGAL
ST_*
前缀改为
CG_*
所有SFCGAL函数重命名,旧的
ST_
前缀函数已被弃用。
ST_DFullyWithin
语义变更
现在等价于
ST_Contains(ST_Buffer(A, R), B)
,可能返回不同结果。
ST_AsGeoJSON(record)
签名变更
可将列提升为Feature的
id
,物化视图需要重新构建。
ST_GeneratePoints
种子值变更
带种子的随机点生成结果不同,如有需要请重新生成。
ST_Clip
变体被替换
新增
touched
参数,物化视图需要重新构建。

New Functions

新函数

FunctionPurpose
ST_HasZ(geom)
/
ST_HasM(geom)
Boolean Z/M dimension checks
ST_CurveN(geom, n)
/
ST_NumCurves(geom)
CompoundCurve accessors
ST_RemoveIrrelevantPointsForView(geom, ...)
Viewport-based simplification
ST_RemoveSmallParts(geom, ...)
Remove small polygon parts (slivers)
TopoGeo_LoadGeometry(topo, geom, tol)
Load geometry into topology
CG_Visibility(polygon, point)
Visibility polygon (SFCGAL)
CG_*Partition
functions
Polygon partitioning algorithms (SFCGAL)
ST_ExtrudeStraightSkeleton(geom)
Extrude along straight skeleton (SFCGAL)
函数用途
ST_HasZ(geom)
/
ST_HasM(geom)
检查几何对象是否包含Z/M维度的布尔函数
ST_CurveN(geom, n)
/
ST_NumCurves(geom)
复合曲线访问器函数
ST_RemoveIrrelevantPointsForView(geom, ...)
基于视口的几何简化函数
ST_RemoveSmallParts(geom, ...)
移除多边形中的小部件(狭长碎片)
TopoGeo_LoadGeometry(topo, geom, tol)
将几何对象加载到拓扑中
CG_Visibility(polygon, point)
可见性多边形(SFCGAL)
CG_*Partition
系列函数
多边形分区算法(SFCGAL)
ST_ExtrudeStraightSkeleton(geom)
沿直骨架拉伸几何对象(SFCGAL)

ST_Clip
touched
(Raster)

ST_Clip 新增
touched
参数(栅格)

sql
-- Include pixels touched by geometry, not just centers-inside
SELECT ST_Clip(rast, geom, touched => true) FROM raster_table;
sql
-- 包含与几何对象接触的像素,而不仅仅是中心在几何内的像素
SELECT ST_Clip(rast, geom, touched => true) FROM raster_table;

3.5.1 (2024-12-22)

3.5.1(2024-12-22)

Breaking:
ST_TileEnvelope
now clips envelopes to tile plane extent. Edge tiles return smaller geometries than before.
破坏性变更
ST_TileEnvelope
现在会将包络线裁剪到瓦片平面范围。边缘瓦片返回的几何对象比之前更小。

3.6.0 (2025-09-01)

3.6.0(2025-09-01)

Requires: PostgreSQL 12-18, GEOS 3.8+, Proj 6.1+. GEOS 3.14+ for full features. SFCGAL 2.2+ for all SFCGAL features.
系统要求:PostgreSQL 12-18、GEOS 3.8及以上、Proj 6.1及以上。使用全部功能需要GEOS 3.14及以上。使用所有SFCGAL功能需要SFCGAL 2.2及以上。

Breaking Changes

破坏性变更

ChangeImpact
TIN/PolyhedralSurface accessors
ST_NumGeometries
/
ST_GeometryN
return 1. Use
ST_NumPatches
/
ST_PatchN
instead.
Topology bigintTopology IDs now
bigint
. Integer functions replaced with bigint versions.
st_approxquantile(raster, double precision)
Removed (ambiguous). Use variant with additional params.
变更内容影响
TIN/多面体表面访问器变更
ST_NumGeometries
/
ST_GeometryN
返回1,需改用
ST_NumPatches
/
ST_PatchN
拓扑ID改为bigint类型拓扑ID现在为
bigint
,整数版本的函数已被bigint版本替代。
st_approxquantile(raster, double precision)
被移除
该函数存在歧义,需使用带额外参数的变体。

New Functions

新函数

FunctionPurpose
ST_CoverageClean(geom[])
Clean polygonal coverage — edge match + gap removal (GEOS 3.14)
ST_AsRasterAgg(...)
Aggregate: create raster from geometries
ST_ReclassExact(rast, ...)
Remap exact values in raster
ST_IntersectionFractions(rast, geom)
Raster pixel/geometry intersection fractions (GEOS 3.14)
ValidateTopologyPrecision
/
MakeTopologyPrecise
Topology precision validation and repair
函数用途
ST_CoverageClean(geom[])
清理多边形覆盖层——边缘匹配+间隙移除(需GEOS 3.14)
ST_AsRasterAgg(...)
聚合函数:从几何对象创建栅格
ST_ReclassExact(rast, ...)
精确重映射栅格中的值
ST_IntersectionFractions(rast, geom)
栅格像素与几何对象的相交比例(需GEOS 3.14)
ValidateTopologyPrecision
/
MakeTopologyPrecise
拓扑精度验证与修复

New SFCGAL Functions (SFCGAL 2.2)

新SFCGAL函数(需SFCGAL 2.2)

FunctionPurpose
CG_Simplify
3D geometry simplification
CG_3DAlphaWrapping
Tight 3D surface around point set
CG_Scale
/
CG_Translate
/
CG_Rotate
3D affine transformations
CG_Buffer3D
3D buffering
CG_StraightSkeletonPartition
Partition polygon via straight skeleton
SFCGAL now supports M coordinates (SFCGAL >= 1.5.0).
函数用途
CG_Simplify
3D几何简化
CG_3DAlphaWrapping
为点集生成紧凑的3D表面
CG_Scale
/
CG_Translate
/
CG_Rotate
3D仿射变换
CG_Buffer3D
3D缓冲
CG_StraightSkeletonPartition
通过直骨架对多边形进行分区
SFCGAL现在支持M坐标(需SFCGAL >= 1.5.0)。