error: value centroid is not a member of com.esri.core.geometry.Polygon

未关闭
#183 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
java, scala
领域
data

调研方向

从报告中所示的 com.esri.core.geometry.Polygon 的 Spark shell imports 和 OperatorImportFromWkt.local().execute 调用开始。检查 Polygon API 和 poly 的推断类型,然后对照 centroid 的文档化入口点或相关测试;完成的标准是确定这是 API 问题还是 Scala 使用问题,并记录受支持的调用方式。

由索引模型根据 Issue 内容生成。

描述

question

Hi i am trying to use your library in spark shell environement but i have this error message:

:36: error: value centroid is not a member of com.esri.core.geometry.Polygon

My code :

spark-shell --master yarn --packages com.esri.geometry:esri-geometry-api:2.1.0

**import com.esri.core.geometry.Geometry
import com.esri.core.geometry.Polygon

val polygone = "POLYGON((4.745655459623948 46.03524426717903,4.745474046571832 46.035518174904055,4.74063090530349 46.04295685260622,4.739925882208126 46.044547519914246,4.739483609776077 46.04626745631142,4.739525128019815 46.047211663812355,4.739825175736136 46.048150103132244,4.740250385460172 46.04899654987392,4.741872451093781 46.05062714796118,4.743407686504395 46.05171953368259,4.747262145106063 46.053369755378974,4.751383858596383 46.055239098889565,4.753175276721485 46.05628146390567,4.755169011518056 46.05749901172311,4.75661821455738 46.05884025314148,4.757293283105074 46.05947830843228,4.758004296858232 46.06022839197492,4.758948494130379 46.061108160671,4.759081962267134 46.061195261252315,4.760737772227097 46.06061922955403,4.761719663784567 46.0601707369959,4.765096689865299 46.05832039797115,4.767379341111917 46.05732648395931,4.771955501771072 46.0555626231788,4.774437468314938 46.05469875488001,4.777836928008835 46.054085261406435,4.779689110155892 46.05215478789901,4.779868950123478 46.051835812485,4.780103563084089 46.05129079690939,4.781085536976064 46.04865878444159,4.781551741322944 46.04464325432172,4.775383402380884 46.04401133253986,4.774671046394766 46.04398195310052,4.77298489972034 46.043838098435366,4.7690157048809 46.04324888213076,4.768949645555281 46.04320577772445,4.768861191503296 46.04266762819899,4.767707575895149 46.040700441166436,4.765270854408862 46.03772010926994,4.759771208178281 46.03588709341677,4.755999294025783 46.035337603929165,4.750472322601267 46.03604097592636,4.745655459623948 46.03524426717903))"

val poly = OperatorImportFromWkt.local().execute(2,Geometry.Type.Polygon,polygone,null)**

// this last execution produce my error

poly.centroid

// do you think that librairy is not compatible with scala ?
// thank you for help

主要语言
Java
星标
710
派生
268
平均合并
7 天 23 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Esri/geometry-api-java 的其他 Issue

查看 Esri/geometry-api-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。