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

c2c网站页面设计特点wordpress获取用户id

c2c网站页面设计特点,wordpress获取用户id,天津网站免费制作,外贸必备的appJTS#xff08;Java Topology Suite#xff09;是一套用于创建、操作和分析二维几何对象的Java库。JTS提供了丰富的几何操作和分析功能#xff0c;是GIS#xff08;地理信息系统#xff09;应用中的重要工具。以下是JTS库的一些主要功能及其详细使用示例#xff1a; 1. …JTSJava Topology Suite是一套用于创建、操作和分析二维几何对象的Java库。JTS提供了丰富的几何操作和分析功能是GIS地理信息系统应用中的重要工具。以下是JTS库的一些主要功能及其详细使用示例 1. 添加JTS依赖 如果你使用Maven构建项目可以在pom.xml中添加以下依赖 dependencygroupIdorg.locationtech.jts/groupIdartifactIdjts-core/artifactIdversion1.18.2/version /dependency2. 基本几何对象的创建 JTS提供了多种几何对象如点Point、线串LineString和多边形Polygon。 import org.locationtech.jts.geom.*;public class JtsBasicExample {public static void main(String[] args) {GeometryFactory geometryFactory new GeometryFactory();// 创建点对象Point point geometryFactory.createPoint(new Coordinate(10, 20));// 创建线串对象Coordinate[] lineCoordinates new Coordinate[] {new Coordinate(10, 20),new Coordinate(30, 40),new Coordinate(50, 60)};LineString lineString geometryFactory.createLineString(lineCoordinates);// 创建多边形对象Coordinate[] polygonCoordinates new Coordinate[] {new Coordinate(10, 20),new Coordinate(10, 40),new Coordinate(30, 40),new Coordinate(30, 20),new Coordinate(10, 20)};Polygon polygon geometryFactory.createPolygon(polygonCoordinates);System.out.println(Point: point);System.out.println(LineString: lineString);System.out.println(Polygon: polygon);} } 3. 几何操作 JTS提供了一系列几何操作如缓冲区Buffer、相交Intersection、并集Union和差集Difference。 import org.locationtech.jts.geom.*; import org.locationtech.jts.io.WKTReader; import org.locationtech.jts.io.ParseException;public class JtsOperationsExample {public static void main(String[] args) {GeometryFactory geometryFactory new GeometryFactory();// 创建点对象Point point geometryFactory.createPoint(new Coordinate(10, 20));// 创建线串对象LineString lineString geometryFactory.createLineString(new Coordinate[] {new Coordinate(10, 20),new Coordinate(30, 40)});// 创建多边形对象Polygon polygon geometryFactory.createPolygon(new Coordinate[] {new Coordinate(10, 20),new Coordinate(10, 40),new Coordinate(30, 40),new Coordinate(30, 20),new Coordinate(10, 20)});// 缓冲区操作Geometry bufferedPolygon polygon.buffer(5);System.out.println(Buffered Polygon: bufferedPolygon);// 相交操作Geometry intersection point.intersection(lineString);System.out.println(Intersection: intersection);// 并集操作Geometry union point.union(lineString);System.out.println(Union: union);// 差集操作Geometry difference polygon.difference(lineString);System.out.println(Difference: difference);} } 4. 几何对象的WKT转换 JTS支持将几何对象转换为WKTWell-Known Text格式以及从WKT格式解析几何对象。 import org.locationtech.jts.geom.*; import org.locationtech.jts.io.WKTReader; import org.locationtech.jts.io.WKTWriter; import org.locationtech.jts.io.ParseException;public class JtsWktExample {public static void main(String[] args) {GeometryFactory geometryFactory new GeometryFactory();WKTWriter writer new WKTWriter();WKTReader reader new WKTReader(geometryFactory);// 创建几何对象Point point geometryFactory.createPoint(new Coordinate(10, 20));String wkt writer.write(point);System.out.println(WKT of Point: wkt);// 从WKT解析几何对象try {Geometry geometry reader.read(POINT (10 20));System.out.println(Parsed Geometry: geometry);} catch (ParseException e) {e.printStackTrace();}} } 5. 空间关系与分析 TS提供了丰富的空间关系检查和分析功能例如判断几何对象是否相交、包含或重叠。 import org.locationtech.jts.geom.*;public class JtsSpatialAnalysisExample {public static void main(String[] args) {GeometryFactory geometryFactory new GeometryFactory();// 创建两个多边形对象Polygon polygon1 geometryFactory.createPolygon(new Coordinate[] {new Coordinate(10, 20),new Coordinate(10, 40),new Coordinate(30, 40),new Coordinate(30, 20),new Coordinate(10, 20)});Polygon polygon2 geometryFactory.createPolygon(new Coordinate[] {new Coordinate(20, 30),new Coordinate(20, 50),new Coordinate(40, 50),new Coordinate(40, 30),new Coordinate(20, 30)});// 判断是否相交boolean intersects polygon1.intersects(polygon2);System.out.println(Intersects: intersects);// 判断是否包含boolean contains polygon1.contains(polygon2);System.out.println(Contains: contains);// 判断是否重叠boolean overlaps polygon1.overlaps(polygon2);System.out.println(Overlaps: overlaps);} } 总结 JTSJava Topology Suite库是一个强大的几何处理工具提供了丰富的几何对象创建、操作和分析功能。通过JTS你可以进行各种几何计算和空间分析并将几何对象转换为标准的WKT格式以便于存储和传输。在实际应用中JTS广泛用于地理信息系统GIS、地图服务和空间数据处理等领域。
http://www.pierceye.com/news/584683/

相关文章:

  • 扬中本地网站外国做美食视频网站
  • 深圳手机网站制作价钱阜阳中国建设银行官网站
  • 廊坊建设网站企业安卓开发自学教程
  • 做网站虚拟主机配置汉沽手机网站建设
  • 设计一个网站先做哪些构造姑苏区建设局网站
  • 制造业营销外贸网站建设网站管理的内容包括
  • 看电视剧的免费网站app下载网站等保如何做
  • 如何做网站的营销中山vi设计公司
  • 搜索引擎网站使用的排名规则室内设计联盟网页版
  • php 手机网站开发手机端网站开发框架
  • 苏州电信网站备案浙江搜索引擎优化
  • 黄岛网站建设哪家好市体育局网站 两学一做
  • 上海建设银行网站转账记录吗外国网站做问卷调查挣钱
  • 深圳做购物网站十堰网络销售
  • 郑州企业网站优化多少钱百度竞价排名价格
  • js特效做的好的网站什么专业是做网站
  • 淄川响应式网站建设网站在国内服务器在国外
  • 施工企业市场经营工作思路及措施个人如何优化网站有哪些方法
  • 怎么做一个盈利网站义乌创博网络科技有限公司
  • 学校网站建设代码不重名的建筑公司名字
  • 网站开发模块的需求海外销售平台有哪些
  • 前端和后端的区别工资郑州网站优化怎样做
  • 小程序模板平台有哪些网站优化包括哪些内容
  • 免费建网站的好的移动端网站模板下载
  • 青岛网站优化排名视频源网站怎么做
  • 做网站找我二级学院网站建设方案
  • 知名网站建设公司 北京近期网络营销的热点事件
  • 网站开发产品经理网站例子
  • 动态静态结合网站网站做404是什么意思
  • 注册域名的网站网站建设的具体步骤