package space.nstart.pcp.pcp_types_lib.utils.wkt

import org.locationtech.jts.geom.Geometry
import org.locationtech.jts.io.WKTReader
import org.locationtech.jts.io.WKTWriter

class WKTParser {
    private val wktReader = WKTReader()
    private val wktWriter = WKTWriter()
    fun parseWKT(wkt: String): Geometry {
        return wktReader.read(wkt)
    }
    fun toWKT(geometry: Geometry): String {
        return wktWriter.write(geometry)
    }
}