Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.GeometryCoordinateSequenceTransformer.transform()


                            MathTransform tx = CRS.findMathTransform(source, target, true);
                            GeometryCoordinateSequenceTransformer gtx =
                                new GeometryCoordinateSequenceTransformer();
                            gtx.setMathTransform(tx);
                           
                            values[j] = gtx.transform(geometry);   
                        }
                        catch( Exception e ) {
                            String msg = "Failed to reproject geometry:" + e.getLocalizedMessage();
                            throw new WFSTransactionException( msg, e );
                        }
View Full Code Here


                            transformers.put(crs, transformer);
                        }

                        // do the transformation
                        try {
                            object = transformer.transform(geometry);
                        } catch (TransformException e) {
                            String msg = "Error occured transforming " + geometry.toString();
                            throw (IOException) new IOException(msg).initCause(e);
                        }
                    }
View Full Code Here

    GeometryCoordinateSequenceTransformer transformer;
    transformer = getTransformer(gFactory, geomCrs, reprojectCrs);
    Geometry geometry;
    try {
      geometry = transformer.transform(geom);
    } catch (TransformException e) {
      throw e;
    }
    return geometry;
  }
View Full Code Here

        } catch (FactoryException e) {
            throw new RuntimeException("Failed to find transform.", e);
        }
        com.vividsolutions.jts.geom.Geometry transGeom;
        try {
            transGeom = gt.transform((com.vividsolutions.jts.geom.Geometry) this.unwrap());
        } catch (TransformException e) {
            throw new RuntimeException("Failed to transform.", e);
        }
        Geometry transformed = (Geometry) GeometryWrapper.wrap(getParentScope(), transGeom);
        transformed.projection = toProj;
View Full Code Here

                            transformers.put(crs, transformer);
                        }

                        // do the transformation
                        try {
                            object = transformer.transform(geometry);
                        } catch (TransformException e) {
                            String msg = "Error occured transforming " + geometry.toString();
                            throw (IOException) new IOException(msg).initCause(e);
                        }
                    }
View Full Code Here

                            MathTransform tx = CRS.findMathTransform(source, target, true);
                            GeometryCoordinateSequenceTransformer gtx =
                                new GeometryCoordinateSequenceTransformer();
                            gtx.setMathTransform(tx);
                           
                            values[j] = gtx.transform(geometry);   
                        }
                        catch( Exception e ) {
                            String msg = "Failed to reproject geometry:" + e.getLocalizedMessage();
                            throw new WFSTransactionException( msg, e );
                        }
View Full Code Here

                            MathTransform tx = CRS.findMathTransform(source, target, true);
                            GeometryCoordinateSequenceTransformer gtx =
                                new GeometryCoordinateSequenceTransformer();
                            gtx.setMathTransform(tx);
                           
                            values[j] = gtx.transform(geometry);   
                        }
                        catch( Exception e ) {
                            String msg = "Failed to reproject geometry:" + e.getLocalizedMessage();
                            throw new WFSTransactionException( msg, e );
                        }
View Full Code Here

                            transformers.put(crs, transformer);
                        }

                        // do the transformation
                        try {
                            object = transformer.transform(geometry);
                        } catch (TransformException e) {
                            String msg = "Error occured transforming " + geometry.toString();
                            throw (IOException) new IOException(msg).initCause(e);
                        }
                    }
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.