【问题标题】:Spatialite return XY coordinate in Double PrecisionSpatialite以双精度返回XY坐标
【发布时间】:2017-08-16 02:56:44
【问题描述】:

我正在尝试返回 QspatiaLite 中折线的第一个顶点。 使用了函数 x(),但它返回整数坐标值。 如何以双精度返回坐标值? 这是我的查询和结果:

【问题讨论】:

    标签: qgis spatialite


    【解决方案1】:

    一种可能性是使用 printf 函数来格式化输出:

    SELECT id, AsText(StartPoint(Geometry), printf("%.02f", ST_X(PointN(Geometry,1))) FROM shp_lane; 
    

    【讨论】:

      猜你喜欢
      • 2019-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-04
      • 2018-09-02
      相关资源
      最近更新 更多