IBM Informix Spatial datablade LineFromText 函数

发布于 2024-08-27 05:42:43 字数 144 浏览 7 评论 0原文

我正在将 IBM-Informix 用于我的学校项目,作为 IBM 开展的“Informix 校园”活动的一部分。

但是,在第二个 linefromtext 函数中,它给我的错误是“(USE31) - ST_LineFromText 中几何类型的点太少。”。

I am using IBM-Informix for my school project as part of "Informix on-campus" ativity conduted by IBM.

however it is giving me error as "(USE31) - Too few points for geometry type in ST_LineFromText.", in the second linefromtext function.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

止于盛夏 2024-09-03 05:42:43

第二次调用 ST_LineFromText() 时的问题是您试图将参数传递给它,但这是不可能的。您有:

ST_LineFromText('linestring (0 0,v1.pre 0,v1.pre v1.post,0 v1.post,0 0 )',5)

字符串包含“v1.pre”,这不是有效的数字等。如果您需要参数化查询,则需要使用这些值生成字符串,或者需要使用不同的方法。一种粗略但可能的解决方案是:

ST_LineFromText('linestring (0 0,' || v1.pre || ' 0,' || v1.pre || ' ' ||
                v1.post || ',0 ' || v1.post || ',0 0 )', 5)

这可能无法完成工作 - 但说明了问题。

The problem in the second call to ST_LineFromText() is that you are attempting to pass parameters into it, which isn't possible. You have:

ST_LineFromText('linestring (0 0,v1.pre 0,v1.pre v1.post,0 v1.post,0 0 )',5)

The string contains 'v1.pre' which is not a valid number, etc. If you need to parameterize your query, you either need to generate the string with those values in place, or you need to use a different method. One crude but possible solution is:

ST_LineFromText('linestring (0 0,' || v1.pre || ' 0,' || v1.pre || ' ' ||
                v1.post || ',0 ' || v1.post || ',0 0 )', 5)

This may not do the job - but illustrates the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文