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

免费推广渠道有哪些百度seo刷排名网址

免费推广渠道有哪些,百度seo刷排名网址,php网站代做,网站建设维护职责简介 JTS是加拿大的 Vivid Solutions公司做的一套开放源码的 Java API。它提供了一套空间数据操作的核心算法。为在兼容OGC标准的空间对象模型中进行基础的几何操作提供2D空间谓词API。 操作 表示Geometry对象 Geometry类型介绍见另一篇文章#xff1a;WKT WKB和GeoJSON pa…简介 JTS是加拿大的 Vivid Solutions公司做的一套开放源码的 Java API。它提供了一套空间数据操作的核心算法。为在兼容OGC标准的空间对象模型中进行基础的几何操作提供2D空间谓词API。 操作 表示Geometry对象 Geometry类型介绍见另一篇文章WKT WKB和GeoJSON package com.alibaba.autonavi;import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryCollection; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.geom.LinearRing; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.geom.MultiPolygon; import com.vividsolutions.jts.geom.MultiLineString; import com.vividsolutions.jts.geom.MultiPoint; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKTReader;public class GeometryDemo {private GeometryFactory geometryFactory new GeometryFactory();/*** create a point* return*/public Point createPoint(){Coordinate coord new Coordinate(109.013388, 32.715519);Point point geometryFactory.createPoint( coord );return point;}/*** create a point by WKT* return* throws ParseException */public Point createPointByWKT() throws ParseException{WKTReader reader new WKTReader( geometryFactory );Point point (Point) reader.read(POINT (109.013388 32.715519));return point;}/*** create multiPoint by wkt* return*/public MultiPoint createMulPointByWKT()throws ParseException{WKTReader reader new WKTReader( geometryFactory );MultiPoint mpoint (MultiPoint) reader.read(MULTIPOINT(109.013388 32.715519,119.32488 31.435678));return mpoint;}/*** * create a line* return*/public LineString createLine(){Coordinate[] coords new Coordinate[] {new Coordinate(2, 2), new Coordinate(2, 2)};LineString line geometryFactory.createLineString(coords);return line;}/*** create a line by WKT* return* throws ParseException*/public LineString createLineByWKT() throws ParseException{WKTReader reader new WKTReader( geometryFactory );LineString line (LineString) reader.read(LINESTRING(0 0, 2 0));return line;}/*** create multiLine * return*/public MultiLineString createMLine(){Coordinate[] coords1 new Coordinate[] {new Coordinate(2, 2), new Coordinate(2, 2)};LineString line1 geometryFactory.createLineString(coords1);Coordinate[] coords2 new Coordinate[] {new Coordinate(2, 2), new Coordinate(2, 2)};LineString line2 geometryFactory.createLineString(coords2);LineString[] lineStrings new LineString[2];lineStrings[0] line1;lineStrings[1] line2;MultiLineString ms geometryFactory.createMultiLineString(lineStrings);return ms;}/*** create multiLine by WKT* return* throws ParseException*/public MultiLineString createMLineByWKT()throws ParseException{WKTReader reader new WKTReader( geometryFactory );MultiLineString line (MultiLineString) reader.read(MULTILINESTRING((0 0, 2 0),(1 1,2 2)));return line;}/*** create a polygon(多边形) by WKT* return* throws ParseException*/public Polygon createPolygonByWKT() throws ParseException{WKTReader reader new WKTReader( geometryFactory );Polygon polygon (Polygon) reader.read(POLYGON((20 10, 30 0, 40 10, 30 20, 20 10)));return polygon;}/*** create multi polygon by wkt* return* throws ParseException*/public MultiPolygon createMulPolygonByWKT() throws ParseException{WKTReader reader new WKTReader( geometryFactory );MultiPolygon mpolygon (MultiPolygon) reader.read(MULTIPOLYGON(((40 10, 30 0, 40 10, 30 20, 40 10),(30 10, 30 0, 40 10, 30 20, 30 10))));return mpolygon;}/*** create GeometryCollection contain point or multiPoint or line or multiLine or polygon or multiPolygon* return* throws ParseException*/public GeometryCollection createGeoCollect() throws ParseException{LineString line createLine();Polygon poly createPolygonByWKT();Geometry g1 geometryFactory.createGeometry(line);Geometry g2 geometryFactory.createGeometry(poly);Geometry[] garray new Geometry[]{g1,g2};GeometryCollection gc geometryFactory.createGeometryCollection(garray);return gc;}/*** create a Circle 创建一个圆圆心(x,y) 半径RADIUS* param x* param y* param RADIUS* return*/public Polygon createCircle(double x, double y, final double RADIUS){final int SIDES 32;//圆上面的点个数Coordinate coords[] new Coordinate[SIDES1];for( int i 0; i SIDES; i){double angle ((double) i / (double) SIDES) * Math.PI * 2.0;double dx Math.cos( angle ) * RADIUS;double dy Math.sin( angle ) * RADIUS;coords[i] new Coordinate( (double) x dx, (double) y dy );}coords[SIDES] coords[0];LinearRing ring geometryFactory.createLinearRing( coords );Polygon polygon geometryFactory.createPolygon( ring, null );return polygon;}/*** param args* throws ParseException */public static void main(String[] args) throws ParseException {GeometryDemo gt new GeometryDemo();Polygon p gt.createCircle(0, 1, 2);//圆上所有的坐标(32个)Coordinate coords[] p.getCoordinates();for(Coordinate coord:coords){System.out.println(coord.x,coord.y);}} }Geometry之间的关系 支持的空间操作包括 相等(Equals)几何形状拓扑上相等。脱节(Disjoint)几何形状没有共有的点。相交(Intersects)几何形状至少有一个共有点区别于脱节接触(Touches)几何形状有至少一个公共的边界点但是没有内部点。交叉(Crosses)几何形状共享一些但不是所有的内部点。内含(Within)几何形状A的线都在几何形状B内部。包含(Contains)几何形状B的线都在几何形状A内部区别于内含重叠(Overlaps)几何形状共享一部分但不是所有的公共点而且相交处有他们自己相同的区域。 package com.alibaba.autonavi;import com.vividsolutions.jts.geom.*; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKTReader;/*** gemotry之间的关系**/ public class GeometryRelated {private GeometryFactory geometryFactory new GeometryFactory();/*** 两个几何对象是否是重叠的* return* throws ParseException*/public boolean equalsGeo() throws ParseException{WKTReader reader new WKTReader( geometryFactory );LineString geometry1 (LineString) reader.read(LINESTRING(0 0, 2 0, 5 0));LineString geometry2 (LineString) reader.read(LINESTRING(5 0, 0 0));return geometry1.equals(geometry2);//true}/*** 几何对象没有交点(相邻)* return* throws ParseException*/public boolean disjointGeo() throws ParseException{WKTReader reader new WKTReader( geometryFactory );LineString geometry1 (LineString) reader.read(LINESTRING(0 0, 2 0, 5 0));LineString geometry2 (LineString) reader.read(LINESTRING(0 1, 0 2));return geometry1.disjoint(geometry2);}/*** 至少一个公共点(相交)* return* throws ParseException*/public boolean intersectsGeo() throws ParseException{WKTReader reader new WKTReader( geometryFactory );LineString geometry1 (LineString) reader.read(LINESTRING(0 0, 2 0, 5 0));LineString geometry2 (LineString) reader.read(LINESTRING(0 0, 0 2));Geometry interPoint geometry1.intersection(geometry2);//相交点System.out.println(interPoint.toText());//输出 POINT (0 0)return geometry1.intersects(geometry2);}/*** 判断以x,y为坐标的点point(x,y)是否在geometry表示的Polygon中* param x* param y* param geometry wkt格式* return*/public boolean withinGeo(double x,double y,String geometry) throws ParseException {Coordinate coord new Coordinate(x,y);Point point geometryFactory.createPoint( coord );WKTReader reader new WKTReader( geometryFactory );Polygon polygon (Polygon) reader.read(geometry);return point.within(polygon);}/*** param args* throws ParseException */public static void main(String[] args) throws ParseException {GeometryRelated gr new GeometryRelated();System.out.println(gr.equalsGeo());System.out.println(gr.disjointGeo());System.out.println(gr.intersectsGeo());System.out.println(gr.withinGeo(5,5,POLYGON((0 0, 10 0, 10 10, 0 10,0 0))));}}
http://www.pierceye.com/news/193772/

相关文章:

  • 霸州网站制作棋牌网站建设源码
  • 茶叶网站制作模板网页设计在安阳工资多少
  • 网站建设项目验收方案自己做捕鱼网站能不能挣钱
  • 微信网页网站怎么做我为群众办实事实践活动
  • 建设银行发卡银行网站福州 网站设计
  • 网站备案号码舟山高端网站建设
  • 买奢侈品代工厂做的产品的网站名建立网站 英语怎么说
  • 网站访问者qq计算机等级培训机构
  • 可以让外国人做问卷调查的网站济南优化seo网站建设公司
  • odoo做网站创建企业需要什么条件
  • 山西省旅游网站建设分析wordpress 个人介绍
  • 山东高级网站建设赚钱
  • 做网站大概要多少钱新建网站的外链多久生效
  • 天河区建设网站品牌网站建设小8蝌蚪
  • 深圳市企业网站seo点击软件小程序游戏开发公司
  • 南宁企业网站设计公怎么进wordpress
  • 商务网站建设一万字做视频剪辑接私活的网站
  • 网站开发绪论phpstudy建wordpress
  • 网站建设的基本流程有哪些wordpress产品页布局
  • 写过太原的网站免费漫画大全免费版
  • 毕业设计做系统好还是网站好冠县网站建设公司
  • 网站管理制度建设开发一个网站需要多少时间
  • 高校网站建设说明书微信公众号涨粉 网站
  • 深圳网站建设公司哪里好中国施工企业管理协会官网
  • 网站自动抢注步步高学习机进网站怎么做
  • 带域名的网站打不开深圳网站优化多少钱
  • 中国空间站科幻作文1000字网站建设从化
  • 做网站买一个域名就够了吗cn域名知名网站
  • 社科联网站建设个人网页英文
  • 做房产推广那个网站好网站改版建设原则