当前位置: 首页 > news >正文

中英文网站模板常州做网站建设的公司

中英文网站模板,常州做网站建设的公司,公司注册网上核名网站,wordpress pdf 预览pygplates专栏——Reconstruc features——reconstruct regular features Reconstruct regular features导出重构特征到文件示例代码详解 计算重建距离示例代码详解 Reconstruct regular features 这个例子展示了几个不同的场景#xff0c;涉及到重建地质时代的常见特征。 导… pygplates专栏——Reconstruc features——reconstruct regular features Reconstruct regular features导出重构特征到文件示例代码详解 计算重建距离示例代码详解 Reconstruct regular features 这个例子展示了几个不同的场景涉及到重建地质时代的常见特征。 导出重构特征到文件 在这个例子中我们重建常规特征并将结果导出到Shapefile。 示例代码 import pygplates# 加载板块运动模型 rotation_model pygplates.RotationModel(Muller2019-Young2019-Cao2020_CombinedRotations.rot) # 加载一些features features pygplates.FeatureCollection(Global_EarthByte_GPlates_PresentDay_Coastlines.gpmlz) # 重建的地质时间 reconstruction_time 50 # 输出的文件 export_filename 6-Exported_reconstructed_features_to_a_file_reconstructed_{0}Ma.shp.format(reconstruction_time) # 重建 pygplates.reconstruct(features, rotation_model, export_filename, reconstruction_time)详解 首先加载板块运动模型pygplates.RotationModel rotation_model pygplates.RotationModel(rotations.rot)加载需要重建的特征pygplates.FeatureCollection features pygplates.FeatureCollection(features.gpml)设置重建时间 reconstruction_time 50最后完成重建结果并保存 pygplates.reconstruct(features, rotation_model, export_filename, reconstruction_time)计算重建距离 示例代码 import pygplates# 返回几何要素(点/多点/折线/多边形)质心的函数。 def get_geometry_centroid(geometry):# 检查几何要素是否为多边形try:return geometry.get_interior_centroid()except AttributeError:# 不是多边形继续pass# 检查几何要素是否为多线条或多点try:return geometry.get_centroid()except AttributeError:pass# 仅剩点return geometry # 加载板块运动模型 rotation_model pygplates.RotationModel(Muller2019-Young2019-Cao2020_CombinedRotations.rot) # 加载一些特征 features pygplates.FeatureCollection(2-output_points.gpml) # 重建地质时间 reconstruction_time 50 # 重建 reconstructed_feature_geometries [] pygplates.reconstruct(features, rotation_model, reconstructed_feature_geometries, reconstruction_time) # 遍历所有重建结果 for reconstructed_feature_geometry in reconstructed_feature_geometries:# 计算距离今时今日几何要素的质点和重建后的质点distance_reconstructed pygplates.GeometryOnSphere.distance(get_geometry_centroid(reconstructed_feature_geometry.get_present_day_geometry()),get_geometry_centroid(reconstructed_feature_geometry.get_reconstructed_geometry()))# 将弧度转换为公里distance_reconstructed_in_kms distance_reconstructed * pygplates.Earth.mean_radius_in_kms# 输出相关特征名称和板块ID以及重建的距离print(Feature: %s % reconstructed_feature_geometry.get_feature().get_name())print( plate ID: %d % reconstructed_feature_geometry.get_feature().get_reconstruction_plate_id())print( distance reconstructed: %f Kms % distance_reconstructed_in_kms)详解 为了某个功能pygplates定义了许多相关的函数 如果我们可以忽略掉几何要素是否为pygplates.PointOnSpherepygplates.MultiPointOnSpherepygplates.PolyineOnSphere或pygplates.PolygonOnSphere。每种几何要素类型需要不同的方法获取质点。 因此我们首先尝试pygplates.PolygonOnSphere.get_interior_centroid()然后尝试get_centroid()最后几何要素点就是它本身的质点。 def get_geometry_centroid(geometry):try:return geometry.get_interior_centroid()except AttributeError:passtry:return geometry.get_centroid()except AttributeError:passreturn geometry使用pygplates.GeometryOnSphere.distance()方法来计算两个质点之间的最短距离然后使用pygplates.Earth将其转换为公里数。 distance_reconstructed pygplates.GeometryOnSphere.distance(get_geometry_centroid(reconstructed_feature_geometry.get_present_day_geometry()),get_geometry_centroid(reconstructed_feature_geometry.get_reconstructed_geometry())) distance_reconstructed_in_kms distance_reconstructed * pygplates.Earth.mean_radius_in_kms
http://www.sadfv.cn/news/267442/

相关文章:

  • 寿光网站建设公司东莞网络推广服务外包
  • 长春专业做网站为什么wordpress主题中字体不统一
  • 确定网站主题然后规划网站建设网络营销平台有哪些
  • 个性化定制网站自建站跨境电商
  • 福州市连江县建设局网站 天堂在线搜索
  • 石排仿做网站厦门成品网站
  • 阿里云虚拟主机可以做两个网站吗桂林两江四湖夜游时间
  • 免费做手机网站网站自创
  • 宜昌 网站建设天津建筑工程信息网
  • nodejs做网站还是app白嫖二级域名
  • 宛城区微网站开发做网站的收益在哪
  • 网站代码在哪里写门户网站 备案
  • 做平面vi网站谷歌seo推广服务
  • 网站的推广方法广州市网站建设分站价格
  • asp 网站建设教程门户网站建设合同
  • 网站制作明细清单企业年金交满多少年才能领取
  • 丹东企业网站建设平台ppt模板免费完整版
  • linux网站服务器搭建百度网页版
  • seo网络优化前景怎么样重庆高端seo
  • 重庆网站seo外包响应式企业网站后台管理系统
  • 机械设计制造及其自动化圳建设网站做网站用户充值提现
  • 取消网站验证码wordpress禁止更新代码
  • 怎么下载网站页面跨境电商seo
  • 单页面网站做排名做淘宝客网站的流程
  • 黄页88网是什么性质的网站哈尔滨市建设工程网
  • 定制网站制作公司有哪些建设银行企业网站打不开
  • 家装效果图设计网站昆明市网站建设
  • 域名出售网站wordpress 电脑微信登陆不了
  • 门户网站的基本特征信息与服务网站色调搭配
  • 免费炫酷企业网站源码记事本怎么做网站