- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用 hibernate 对距离进行排序,但“st_distance”不起作用。日志:
----- org.hibernate.QueryException: No data type for node: org.hibernate.hql.internal.ast.tree.MethodNode -[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'st_distance' {originalText=st_distance} -[EXPR_LIST] SqlNode: 'exprList' +-[METHOD_CALL] MethodNode: '(' | +-[METHOD_NAME] IdentNode: 'POINT' {originalText=POINT} | -[EXPR_LIST] SqlNode: 'exprList' | +-[DOT] DotNode: 'facilitato0_.c_longitude' {propertyName=longitude,dereferenceType=PRIMITIVE,getPropertyPath=longitude,path={synthetic-alias}.longitude,tableAlias=facilitato0_,className=com.kingox.ins.dao.entity.Facilitator,classAlias=null} | | +-[IDENT] IdentNode: '{synthetic-alias}' {originalText={synthetic-alias}} | | -[IDENT] IdentNode: 'longitude' {originalText=longitude} | -[DOT] DotNode: 'facilitato0_.c_latitude' {propertyName=latitude,dereferenceType=PRIMITIVE,getPropertyPath=latitude,path={synthetic-alias}.latitude,tableAlias=facilitato0_,className=com.kingox.ins.dao.entity.Facilitator,classAlias=null} | +-[IDENT] IdentNode: '{synthetic-alias}' {originalText={synthetic-alias}} | -[IDENT] IdentNode: 'latitude' {originalText=latitude} -[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'POINT' {originalText=POINT} -[EXPR_LIST] SqlNode: 'exprList' +-[PARAM] ParameterNode: '?' {ordinal=0, expectedType=null} -[PARAM] ParameterNode: '?' {ordinal=1, expectedType=null} [select id, name, st_distance(POINT (longitude, latitude),POINT(?,?)) as tmpDistance
最佳答案
Hibernate Spatial 中的距离函数称为 distance
,而不是 st_distance
。
但无论如何 Hibernate Spatial does not support distance
对于 MySQL。
关于java - 如何在hibernate hql和mysql 5.6.2中使用 "st_distance"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46623201/
在 Cosmos DB 中,ST_DISTANCE 函数返回值的单位是什么? docs在这方面没有帮助: Returns the distance between the two GeoJSON Po
在 Cosmos DB 中,ST_DISTANCE 函数返回值的单位是什么? docs在这方面没有帮助: Returns the distance between the two GeoJSON Po
我在 postgis 中遇到 st_distance 函数的问题。它返回错误的结果——对于小距离,误差不大——10 米,也许 20 米,但对于更大的距离,我的结果与例如谷歌地图结果之间的差异太大——7
我正在尝试找出一种将 presto 地理空间函数 ST_DISTANCE 的结果转换为米的方法。 如果我运行此示例查询: 选择 ST_Distance(ST_Point(0.3476, 32.5825
我怎样才能在 postgresql 中运行这个查询并让它工作? SELECT ST_Distance( SELECT coordinates FROM points WHERE id = 1, ST_
我正在运行一个包含大量公司地址表的数据库服务器。连接到它的应用程序接收用户坐标和他们正在寻找的业务类型,并返回离该用户最近的业务。 最初,我的应用程序使用一个简单的 SELECT 语句来查找最近的企业
我有一个多边形类型的几何体,我正在使用 postgis 的 ST_Distance 方法计算 POINT 的最小距离,它可能在多边形几何体内部(由 360 个点组成封闭几何体)或在多边形几何体外部,我
我正在使用 postgis 来计算 2 个地理坐标之间的距离。 select st_distance( 'POINT(15.651955 73.712769)'::geography, 'PO
我正在使用以下查询从 postgresql 数据库中检索记录 @services = Service.select("*, ST_Distance(services.lon_lat, ST_GeomF
我看过关于此主题的类似帖子(例如,参见 here 和 here),但不是特定于 sf-tidyverse 生态系统的帖子。 我有一系列湖泊,每个湖泊内有一系列样本点,每个湖泊中都有一个“焦点”,表示船
我们正在开发一个应用程序,该应用程序涉及根据存储在 PostgreSQL 表中的多边形计算给定点的最短距离。 我们正在使用 PostgreSQL 数据库中的 ST_Distance 函数。 当我们将计
我写了这个查询并且它有效,虽然它有点慢: SELECT name, (ST_Distance( ST_Transform( way,900913 ),ST_Transform( ST_GeomFrom
我想找到区域点和我的点之间的最小距离。我搜索它并找到 ST_CONTAIN ,但是当我使用这个函数时,我得到一个错误: Expected known function, got 'ST_Distanc
我有一个规划应用程序表,我正在尝试将最近的 5 个应用程序返回到一个属性,通过 PHP 返回的 Postgres 查询按最近到最远的距离排序作为 JSON 数组。 结果已成功返回,但它们的排序似乎不正
我想使用 hibernate 对距离进行排序,但“st_distance”不起作用。日志: ----- org.hibernate.QueryException: No data type for n
我的数据库中有一个表,它存储谷歌地图中的位置以及它们返回的坐标。之前我将 lat 和 lng 存储为小数点,在我将 MySQL 版本升级到 8 后,发现有预定义的数据类型和函数来处理坐标和距离计算。我
我想按距离排序,但出现错误 UndefinedFunction: ERROR: function st_distance(geography, geometry, numeric) does not
我正在开发一个使用 PostgreSQL 作为数据库的应用程序;我的目标是以地理格式存档多边形数据,以便在进行查询时使用 pgAdmin OpenStreetMap 集成轻松可视化它们。我的问题是,当
根据文档和其他问题,按距离对 GeoQuerySet 进行排序应该很简单,但我无法让它正常工作。下面举例说明问题的情况: 假设我在两个不同的应用程序中有两个模型。 appA 中的一个模型和 appB
我是一名优秀的程序员,十分优秀!