Examples of Geometry


Examples of ca.carleton.gcrc.geom.Geometry

           
            if( JSONSupport.containsKey(jsonDoc, "nunaliit_geom") ) {
              JSONObject jsonGeom = jsonDoc.getJSONObject("nunaliit_geom");
              String wkt = jsonGeom.optString("wkt", null);
              if( null != wkt ){
                Geometry geometry = wktParser.parseWkt(wkt);
                jsonWriter.key("geometry");
                geoWriter.writeGeometry(jsonWriter, geometry);
              }
            }
           
View Full Code Here

Examples of ch.epfl.lbd.database.spatial.Geometry

    episodes = new ArrayList<Episode>();
  }
 
  public Geometry getGeometry(){
    if(episodes.size() < 2) return null;
    Geometry trj_shape = episodes.get(1).getGeometry();
    for(Episode episode : episodes){
      if(episode instanceof Move)
        trj_shape = trj_shape.union(episode.getGeometry());
    }
    return trj_shape;
  }
View Full Code Here

Examples of chunmap.model.geom.Geometry

   * {@link chunmap.model.geom.WktReader#read(java.lang.String)} 的测试方法。
   */
  @Test
  public void testReadPoint() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("POINT(1230.09 234)");
    Geometry g2 = wkt.read(g.toString());
    assertTrue(g2.toString().equals("POINT(1230.09 234.0)"));
  }
View Full Code Here

Examples of com.esri.core.geometry.Geometry

        if (token == JsonToken.START_OBJECT) {
          if (parser.getCurrentName() == "geometry") {
            if (geometryColumn > -1) {
              // create geometry and insert into geometry field
              Geometry geometry =  GeometryEngine.jsonToGeometry(parser).getGeometry();
              row.set(geometryColumn, GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(geometry, null)));
            } else {
              // no geometry in select field set, don't even bother parsing
              parser.skipChildren();
            }
View Full Code Here

Examples of com.github.davidmoten.rtree.geometry.Geometry

    }

    @SuppressWarnings("unchecked")
    @Test
    public void testSearchProducerThrowsExceptionFromRequestSome() {
        Geometry g = new Geometry() {

            @Override
            public double distance(Rectangle r) {
                throw new RuntimeException("boo");
            }
View Full Code Here

Examples of com.jme.scene.Geometry

                markerVertices.add(new Vector3f(i * spacing, 0, size));
                markerVertices.add(new Vector3f(-i * spacing, 0, -size));
                markerVertices.add(new Vector3f(-i * spacing, 0, size));
            }
        }
        Geometry regularGrid = new Line("regularLine", regularVertices.toArray(new Vector3f[] {}), null, null, null);
        regularGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.05f));
        regularGrid.setModelBound(new BoundingBox());
        regularGrid.updateModelBound();
        lines.attachChild(regularGrid);
        Geometry markerGrid = new Line("markerLine", markerVertices.toArray(new Vector3f[] {}), null, null, null);
        markerGrid.getDefaultColor().set(new ColorRGBA(1, 1, 1, 0.1f));
        markerGrid.setModelBound(new BoundingBox());
        markerGrid.updateModelBound();
        lines.attachChild(markerGrid);
        if (rotation != null) lines.getLocalRotation().fromAngles(rotation.x, rotation.y, rotation.z);

        Node axis = new Node("axis");
        this.attachChild(axis);
View Full Code Here

Examples of com.jme3.scene.Geometry

    }

    @Override
    public void simpleInitApp() {
        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", b);
        geom.updateModelBound();

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
        mat.setColor("m_Color", ColorRGBA.Blue);
        geom.setMaterial(mat);

        rootNode.attachChild(geom);
    }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry

  }

  public void writeObject(Object object, GraphicsDocument document, boolean asChild) throws RenderException {
    try {
      InternalFeature feature = (InternalFeature) object;
      Geometry geom = feature.getGeometry();
      if (feature.isClipped()) {
        geom = feature.getClippedGeometry();
      }
      geom = transformer.transform(geom);
      if (isPointLike(feature)) {
        if (feature.getStyleInfo().getSymbol() != null) {
          SymbolInfo info = feature.getStyleInfo().getSymbol();
          for (Coordinate coordinate : geom.getCoordinates()) {
            if (info.getRect() != null) {
              writeRectangle(document, coordinate, feature, info.getRect());
            } else if (info.getCircle() != null) {
              RectInfo rectInfo = new RectInfo();
              rectInfo.setW(info.getCircle().getR() * 2);
 
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry

      throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "mapCrs");
    }

    Map<VectorLayer, Filter> filters = new LinkedHashMap<VectorLayer, Filter>();
    Filter f;
    Geometry mapGeom = converter.toInternal(criterion.getGeometry());

    for (String serverLayerId : criterion.getServerLayerIds()) {
      VectorLayer vl = configurationService.getVectorLayer(serverLayerId);
      if (vl == null) {
        throw new GeomajasException(ExceptionCode.LAYER_NOT_FOUND, serverLayerId);
      }

      // Transform geometry to layer CRS:
      Geometry layerGeometry = geoService.transform(mapGeom, mapCrs, vectorLayerService.getCrs(vl));

      switch (criterion.getOperator()) {
        case SearchByLocationRequest.QUERY_INTERSECTS:
          f = filterService.createIntersectsFilter(layerGeometry, vl.getFeatureModel()
              .getGeometryAttributeName());
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry

  @Autowired
  private GeoService geoService;

  @Test
  public void transformGeometryString() throws Exception {
    Geometry geometry = getLineString();
    geometry = geoService.transform(geometry, LONLAT, LAMBERT72);
    assertTransformedLineString(geometry);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.