Package org.geoserver.wps.ppio.gpx

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


    public WptType toWpt(Point p) {
        return coordToWpt(p.getX(), p.getY());
    }

    private WptType coordToWpt(double x, double y) {
        WptType wpt = new WptType();
        wpt.setLon(x);
        wpt.setLat(y);
        return wpt;
    }
View Full Code Here


            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);
                WptType wpt = toWpt((Point) pt);
                if (nameStr != null)
                    wpt.setName(nameStr);
                if (commentStr != null)
                    wpt.setCmt(commentStr);
                if (descriptionStr != null)
                    wpt.setDesc(descriptionStr);
                gpxType.getWpt().add(wpt);
            }
        } else if (go instanceof Point) {
            WptType wpt = toWpt((Point) go);
            if (nameStr != null)
                wpt.setName(nameStr);
            if (commentStr != null)
                wpt.setCmt(commentStr);
            if (descriptionStr != null)
                wpt.setDesc(descriptionStr);
            gpxType.getWpt().add(wpt);
        } else {
            // no useful geometry, no feature!
            return;
        }
View Full Code Here

TOP

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

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.