class GeoUtils {

    public static Geometry getGeometryFromCoordinatesAndType( FeatureType featureType, String coordinates )
        throws IOException
    {
        GeometryJSON geometryJSON = new GeometryJSON();

        if ( featureType.equals( FeatureType.NONE ) || featureType.equals( FeatureType.SYMBOL ) )
        {
            throw new IllegalArgumentException( "Invalid featureType '" + featureType.value() + "'" );
        }

        Geometry geometry = geometryJSON
            .read( String.format( "{\"type\": \"%s\", \"coordinates\": %s}", featureType.value(), coordinates ) );

        geometry.setSRID( SRID );

        return geometry;
    }

}