Examples of buffer()


Examples of com.vividsolutions.jts.geom.LineString.buffer()

    if (!(jtsGeometry instanceof LineString)) {
      throw new GeomajasException(ExceptionCode.UNEXPECTED_PROBLEM, "splitter has to be a LineString");
    }
    LineString preciseLine = (LineString) jtsGeometry;
    int precision = polygon.getPrecisionModel().getMaximumSignificantDigits() - 1;
    com.vividsolutions.jts.geom.Geometry bufferedLine = preciseLine.buffer(Math.pow(10.0, -precision));
    com.vividsolutions.jts.geom.Geometry diff = polygon.difference(bufferedLine);

    if (diff instanceof Polygon) {
      response.setGeometries(new Geometry[] { converter.toDto(diff) });
    } else if (diff instanceof MultiPolygon) {
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPolygon.buffer()

            Polygon[] array = (Polygon[]) geometries.toArray(new Polygon[geometries.size()]);
            MultiPolygon mp = gf.createMultiPolygon(array);
           
            // a collection of valid polygon does not necessarily make up a valid multipolygon
            if(array.length > 1 && !mp.isValid()) {
                Geometry g = mp.buffer(0);
                if(g instanceof Polygon) {
                    return gf.createMultiPolygon(new Polygon[] {(Polygon) g});
                } else {
                    return (GeometryCollection) g;
                }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.buffer()

       
        CoordinateReferenceSystem world = imap.getViewportModel().getCRS();
        CoordinateReferenceSystem wsg84 = DefaultGeographicCRS.WGS84;
       
        double buffer = 0.01; // how much of the wgs84 world to see
        Envelope view = point.buffer( buffer ).getEnvelopeInternal();
       
        MathTransform transform;
        try {
            transform = CRS.findMathTransform( wsg84, world, true ); // relaxed
        } catch (FactoryException e) {
View Full Code Here

Examples of com.vividsolutions.jts.geom.Polygon.buffer()

            // there's some rounding that goes on inside SDE. Need to do some simple buffering to
            // make sure
            // we're not getting rounding errors
            assertTrue(modif1.buffer(.01).contains(actual1));
            assertTrue(modif2.buffer(.01).contains(actual2));
        } finally {
            try {
                store.removeFeatures(fid1Filter);
                store.removeFeatures(fid2Filter);
            } catch (Exception e) {
View Full Code Here

Examples of er.extensions.remoteSynchronizer.ERXRemoteSynchronizer.RefByteArrayOutputStream.buffer()

        if (log.isDebugEnabled()) {
            log.debug("Sending notification: " + notification);
        } else if (log.isInfoEnabled()) {
            log.info("Sending " + notification.name() + " notification.");
        }
        Message message = new Message(null, null, baos.buffer(), 0, baos.size());
        _channel.send(message);
    }
}
View Full Code Here

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.CachedEncodingTrait.buffer()

        if (o != null) {
            if( o instanceof Message) {
                if( !isTightEncodingEnabled() && !isCacheEnabled() ) {
                    CachedEncodingTrait encoding = ((Message) o).getCachedEncoding();
                    if( encoding !=null && !encoding.tight() && encoding.version()==getVersion()) {
                        Buffer buffer = encoding.buffer();
                        dataOut.write(buffer.data, buffer.offset + 4, buffer.length() - 4);
                        return;
                    }
                }
            }
View Full Code Here

Examples of io.netty.buffer.ByteBufAllocator.buffer()

    private ByteBuf allocate(ChannelHandlerContext ctx, int capacity) {
        ByteBufAllocator alloc = ctx.alloc();
        if (wantsDirectBuffer) {
            return alloc.directBuffer(capacity);
        } else {
            return alloc.buffer(capacity);
        }
    }

    /**
     * Allocates an outbound network buffer for {@link SSLEngine#wrap(ByteBuffer, ByteBuffer)} which can encrypt
View Full Code Here

Examples of io.netty.buffer.ChannelBufferOutputStream.buffer()

        ObjectOutputStream oout = new CompactObjectOutputStream(bout);
        oout.writeObject(obj);
        oout.flush();
        oout.close();

        ChannelBuffer buffer = bout.buffer();
        int objectSize = buffer.readableBytes();
        writeInt(objectSize);
        buffer.getBytes(0, this, objectSize);
    }
View Full Code Here

Examples of net.gleamynode.netty.buffer.ChannelBufferOutputStream.buffer()

        ObjectOutputStream oout = new CompactObjectOutputStream(bout);
        oout.writeObject(obj);
        oout.flush();
        oout.close();

        ChannelBuffer buffer = bout.buffer();
        int objectSize = buffer.readableBytes();
        writeInt(objectSize);
        buffer.getBytes(0, this, objectSize);
    }
View Full Code Here

Examples of net.tomp2p.futures.FutureDirect.buffer()

          return ret;
        }
      });
      FutureDirect fd = master.peer().sendDirect(peers[50].peerAddress()).buffer(b).start();
      fd.await();
      if (fd.buffer() == null) {
        System.err.println("damm");
        Assert.fail();
      }
      int read = fd.buffer().buffer().readInt();
      Assert.assertEquals(88, read);
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.