Package org.geoserver.wps.ppio.gpx

Examples of org.geoserver.wps.ppio.gpx.RteType


        Object go = ((Property) defaultGeometry).getValue();
        if (go instanceof MultiLineString) {
            int nrls = ((MultiLineString) go).getNumGeometries();
            for (int li = 0; li < nrls; li++) {
                Geometry ls = ((MultiLineString) go).getGeometryN(li);
                RteType rte = toRte((LineString) ls);
                if (nameStr != null)
                    rte.setName(nameStr);
                if (commentStr != null)
                    rte.setCmt(commentStr);
                if (descriptionStr != null)
                    rte.setDesc(descriptionStr);
                gpxType.getRte().add(rte);
            }
        } else if (go instanceof LineString) {
            RteType rte = toRte((LineString) go);
            if (nameStr != null)
                rte.setName(nameStr);
            if (commentStr != null)
                rte.setCmt(commentStr);
            if (descriptionStr != null)
                rte.setDesc(descriptionStr);
            gpxType.getRte().add(rte);
        } else if (go instanceof MultiPoint) {
            int nrpt = ((MultiPoint) go).getNumGeometries();
            for (int pi = 0; pi < nrpt; pi++) {
                Geometry pt = ((MultiPoint) go).getGeometryN(pi);
View Full Code Here


        wpt.setLat(y);
        return wpt;
    }

    public RteType toRte(LineString ls) {
        RteType rte = new RteType();
        List<WptType> rtePts = rte.getRtept();

        Coordinate[] coordinates = ((Geometry) ls).getCoordinates();
        for (int pi = 0; pi < coordinates.length; pi++) {
            rtePts.add(coordToWpt(coordinates[pi].x, coordinates[pi].y));
        }
View Full Code Here

TOP

Related Classes of org.geoserver.wps.ppio.gpx.RteType

Copyright © 2018 www.massapicom. 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.