package com.xkrs.utils;

import org.geolatte.geom.Geometry;
import org.geolatte.geom.Point;
import org.geolatte.geom.codec.Wkt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 开源Gis工具集
 * @author tajochen
 */
public class OpenGeoUtil {

    Logger logger = LoggerFactory.getLogger(OpenGeoUtil.class);

    /**
     * wkt文本转为点数据
     * @param wkt
     * @return
     */
    public static Point wktStrToPoint(String wkt) {
        Point point = (Point) Wkt.fromWkt(wkt);
        return point;
    }

    /**
     * wkt文本转geometry
     * @param wkt
     * @return
     */
    public static Geometry wktStrToGeom(String wkt) {
        Geometry geom = Wkt.fromWkt(wkt);
        return geom;
    }

}
