Package org.geo.spatialsearch.util

Source Code of org.geo.spatialsearch.util.GeometryUtil

package org.geo.spatialsearch.util;

import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;


public final class GeometryUtil {

    public static Point getPoint(double longitude, double latitude, int srid) {
        GeometryFactory geometryFactory = new GeometryFactory();
        Coordinate coordinate = new Coordinate();
        coordinate.x = longitude;
        coordinate.y = latitude;
        Point point = geometryFactory.createPoint(coordinate);
        point.setSRID(srid);
        return point;
    }
}
TOP

Related Classes of org.geo.spatialsearch.util.GeometryUtil

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.