发布关于PostGIS对于USD格式的拓展

我们非常高兴的发布为了一年一度的SIGGRAPH 2023发布关于为PostGIS支持USD格式的新拓展。

新添加了3个函数

ST_AsUSDA(geom geometry, usd_root_name text, usd_geom_name text, width float)
ST_AsUSDC(geom geometry, usd_root_name text, usd_geom_name text, width float)
ST_GeomFromUSD(format int, content bytea)

函数ST_AsUSDA和ST_AsUSDC用于转换PostGIS的geometry为USD数据,可以是文本格式的USDA用于调试,或者是紧凑的二进制USDC格式。所有的参数解释如下。

  • geom, 输入PostGIS几何体
  • usd_root_name text, USD默认Prim的名字,默认为World
  • usd_geom_name text, 生成的USD对象Prim名字,默认为_geometry
  • width, 默认为1.0,对于点Point和线Curve类似的geomtry, 此参数设置其宽度

ST_GeomFromUSD用于转换USD文件到GEOMETRYCOLLECTION,

  • format,设置为1,输入内容为USDA,设置为2,为二进制USDC

代码仓库

  • https://github.com/j-cube/postgis

分支

  • bo-dev-usd

编译和安装的方式等同于PostGIS,一切按照PostGIS文档所描述进行即可。

感谢香港特新科技对本项目的赞助和支持。


We're happy to annouce that the USD format in PostGIS is working for SIGGRAPH 2023.

There are 3 major functions were created,

ST_AsUSDA(geom geometry, usd_root_name text, usd_geom_name text, width float)
ST_AsUSDC(geom geometry, usd_root_name text, usd_geom_name text, width float)
ST_GeomFromUSD(format int, content bytea)

The function ST_AsUSDA and ST_AsUSDC are used convert a PostGIS geometry to USD content, either in ASCII(USDA) format or binary Crate format(USDC). Both of them supports all geometry type. Here is the explanation for all arguments.

  • geom, the PostGIS geometry
  • usd_root_name text, default value is "World", generated USD has default prim with same name
  • usd_geom_name text, default value is "_geometry", if a geometry contains sub-geometry, the all geometry object will be created with flatten USD prims with this name
  • width, default value is 1.0, for Point or Curve-like geometry, it sets the USD width at USD geometry

ST_GeomFromUSD is is used to convert a USD content back to a set of geometry wrapped by GEOMETRYCOLLECTION.

  1. format = 1 when content is USDA, format = 2 for USDC

Repository

  • https://github.com/j-cube/postgis

Branch

  • bo-dev-usd

Build and test as PostGIS document described.

Thanks for the support from Jadason Technology Ltd for this project.

热门相关:亿万盛宠只为你   异世修真邪君   初级VJ情色专业先生   拒嫁豪门,前妻太抢手   本法官萌萌哒