Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()


  }

  private List<Way> getRoute() throws Throwable {
    LinkedList<Way> res = new LinkedList<Way>();
    GeometryFactory f = new GeometryFactory();
    Point origen = f.createPoint(new Coordinate(from.lon(), from.lat()));
    Point destino = f.createPoint(new Coordinate(to.lon(), to.lat()));

    destino.setSRID(4326);
    origen.setSRID(4326);
View Full Code Here


  private List<Way> getRoute() throws Throwable {
    LinkedList<Way> res = new LinkedList<Way>();
    GeometryFactory f = new GeometryFactory();
    Point origen = f.createPoint(new Coordinate(from.lon(), from.lat()));
    Point destino = f.createPoint(new Coordinate(to.lon(), to.lat()));

    destino.setSRID(4326);
    origen.setSRID(4326);

    log.debug("getRoute() from " + origen + " to " + destino);
View Full Code Here

    if (mls != null) {
      for (int i = 0; i < mls.getNumGeometries(); i++) {
        Way way = new Way();
        for (Coordinate coordenada : ((LineString) mls.getGeometryN(i))
            .getCoordinates()) {
          Point p = f.createPoint(coordenada);
          p = (Point) JTS.transform(p,
              CRS.findMathTransform(targetCRS, sourceCRS));
          LatLon ll = new LatLon(p.getY(), p.getX());
          way.addNode(new Node(ll));
          // if (log.isTraceEnabled())
View Full Code Here

  @Test
  public void testProyeccion() {
    GeometryFactory factory = new GeometryFactory();
    final String sourceSRID = "EPSG:4326";
    final String targetSRID = "EPSG:3395";
    Geometry geom = factory.createPoint(new Coordinate(42.349167d,
        3.684722d));
    geom = MessageProcessor.transform(geom, sourceSRID, targetSRID);
    assertEquals(geom.toText(),
        "POINT (410181.3767547725 5184634.982024495)");
View Full Code Here

                if (campos[3].endsWith("W")) {
                    x = -x;
                }

                final GeometryFactory factory = new GeometryFactory();
                final com.vividsolutions.jts.geom.Geometry geom = factory.createPoint(new Coordinate(x, y));
                geom.setSRID(4326);
                //
                // final String sourceSRID = "EPSG:4326";
                // final String targetSRID = "EPSG:3395";
                //
View Full Code Here

            if (campos[3].endsWith("W")) {
                x = -x;
            }

            final GeometryFactory factory = new GeometryFactory();
            final com.vividsolutions.jts.geom.Geometry geom = factory.createPoint(new Coordinate(x, y));
            geom.setSRID(4326);
            RecursoConsultas.findByDispositivoSQL(entrada.getOrigen());

            BandejaEntradaConsultas.processPosiconActual(entrada, geom);
View Full Code Here

            Incidencia f = new Incidencia();
            f.setCreador(Authentication.getUsuario());
            LatLon from = mapViewLocal.getLatLon(mouseEvent.getX(),
                mouseEvent.getY());
            GeometryFactory gf = new GeometryFactory();
            f.setGeometria(gf.createPoint(new Coordinate(
                from.lon(), from.lat())));
            IncidenceDialog id = new IncidenceDialog(
                f,
                i18n.getString("Incidences.summary.title")
                    + " "
View Full Code Here

               
                FeatureWriter fw = ds.getFeatureWriterAppend(name, Transaction.AUTO_COMMIT);
                for (int j = 0; j < m; j++) {
                    fw.hasNext();
                    SimpleFeature f = (SimpleFeature)fw.next();
                    f.setDefaultGeometry(gfac.createPoint(new Coordinate(nextFloat(ran, -180, 180),
                        nextFloat(ran, -90, 90))));
                    f.setAttribute("index", j);
                    fw.write();
                }
                fw.close();
View Full Code Here

        builder.add("label", String.class);
        builder.setName("dest");
        SimpleFeatureType type = builder.buildFeatureType();
        GeometryFactory gf = new GeometryFactory();
        SimpleFeature feature = SimpleFeatureBuilder.build(type,
                new Object[] { gf.createPoint(new Coordinate(0, 0)), "feature0" }, "feature");
        geogig.getRepository().workingTree().insert("dest", feature);
        ImportOp importOp = geogig.command(ImportOp.class);
        importOp.setDataStore(TestHelper.createTestFactory().createDataStore(null));
        importOp.setAll(true);
        importOp.setOverwrite(false);
View Full Code Here

        RevFeatureType featureType = geogig.command(ResolveFeatureType.class)
                .setRefSpec("WORK_HEAD:table/feature1").call().get();
        assertEquals(originalFeatureType.getId(), featureType.getId());
        GeometryFactory gf = new GeometryFactory();
        ImmutableList<Optional<Object>> values = feature.get().getValues();
        assertEquals(values.get(0).get(), gf.createPoint(new Coordinate(0, 7)));
        assertEquals(values.get(1).get(), 3.2);
        assertEquals(values.get(2).get(), 1100.0);
        importOp.setTable("GeoJsonLikeTable");
        importOp.call();
        feature = geogig.command(RevObjectParse.class).setRefSpec("WORK_HEAD:table/feature1")
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.