Examples of CSV


Examples of org.locationtech.udig.tutorials.catalog.csv.CSV

        IGeoResource resource = layer.findGeoResource(CSV.class);
        if (resource == null)
            return;       
        ReferencedEnvelope bounds = getRenderBounds();
        monitor.subTask("connecting");
        CSV csv = resource.resolve(CSV.class, null);
        // LOOK UP STYLE
        IStyleBlackboard style = layer.getStyleBlackboard();
        Color color = (Color) style.get( ColorStyle.ID );

        // DATA TO WORLD
        CoordinateReferenceSystem dataCRS = layer.getCRS();
        CoordinateReferenceSystem worldCRS = context.getCRS();
        MathTransform dataToWorld = CRS.findMathTransform(dataCRS, worldCRS, false);

        // DRAW FILE
        monitor.beginTask("csv render", csv.getSize());
        reader = csv.reader();
       
        int nameIndex = csv.getHeader("name");
        Coordinate worldLocation = new Coordinate();
        String [] row;
        while ((row = reader.readNext()) != null) {
            Point point = csv.getPoint(row);
            Coordinate dataLocation = point.getCoordinate();
            try {
                JTS.transform(dataLocation, worldLocation, dataToWorld);
            } catch (TransformException e) {
                continue;
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.