美文网首页
ducktype spatial

ducktype spatial

作者: hehehehe | 来源:发表于2024-10-09 15:05 被阅读0次
    t = conn.sql(f"select ST_GeomFromText('{wkt}') as geom")
    conn.sql(f"select linestring_length_2d('{wkt}') from t ").show()
    # conn.sql(f"select ST_Length(ST_GeomFromText('{wkt}'))").show()
    conn.sql(f"select ST_NPoints(geom),ST_NumGeometries(geom),ST_Length(geom),"
             f"ST_FlipCoordinates(geom) "
             f" from t").show()
    conn.sql(f"select  ST_Points(geom),ST_Length_Spheroid(ST_FlipCoordinates(geom)),"
             f"ST_ZMax(geom),ST_Distance(ST_GeomFromText('point(116 38)'),ST_GeomFromText('point(116 39)')),"
             f"ST_Distance_Sphere(ST_GeomFromText('point(115 39)'),ST_GeomFromText('point(116 39)'))"
             f" from t").show()

相关文章

网友评论

      本文标题:ducktype spatial

      本文链接:https://www.haomeiwen.com/subject/ahyirjtx.html